Aller au contenu

Photo

Can I add a new constant such as EFFECT_TYPE_FATIGUE?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
I want to do something that seems simple enough: make fatigue effects cumulative. If you cast an Epic spell, it makes you Fatigued for 3 rounds. If you're already Fatigued it makes you Exhausted for 3 rounds. And so on.

I need to be able to check if the caster has the Fatigue effect aleady in place on himself, but there is no constant for this effect.

Adding things in nwscript seems impossible as it won't compile and is part of the core system. I notice if I add an #include with int EFFECT_TYPE_FATIGUE  = 111; in it I do see the constant appear in the list, but obviously it's not that easy since I've never done anything to link the constant and the effect's script together.

Can some one clarify the next step here? I only want to add about 4 effects in all, Fatigue, Exhaustion, Shaken, and such.

#2
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
You can't add a new effect, that is engine.



I would get ahold of kaedrins codebase, and look for how he does fatigue and extend that. It has to be scripted.

#3
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Aw. I was afraid of that. I can script a way to do it, I was just hoping not to have to go the long, complicated, messy route. Oh well.

#4
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Take a look at kaedrins code, i see shaken, fatigued, and exhausted constants and code to support it.

#5
dethia

dethia
  • Members
  • 146 messages
well if you make a fatigue option you can include it in your spell hook and just run the function treating the effects as local vars on the player.