Aller au contenu

Photo

skill peculiarities


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

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
i'm using a modified version of mind blast. here is the code:

 // is creature hostile
            if (IsObjectHostile(stEvent.oCaster, oTarget) == TRUE)
            {
                // remove stacking effects
                RemoveStackingEffects(oTarget, stEvent.oCaster, stEvent.nAbility);
                float fDuration = 3.0;
                eEffect = EffectStun();
                ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, oTarget, fDuration, stEvent.oCaster, stEvent.nAbility);
  }

it works for the first time the player gets stunned. the second time the duration of the stun is perhaps halved, the third time it's even shorter and then it gets back to 3.0 in stun time the fourth time. i would like it to be 3 seconds all the time.
 

Modifié par gordonbrown82, 12 avril 2010 - 04:08 .


#2
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
df-.,

Modifié par gordonbrown82, 12 avril 2010 - 02:19 .


#3
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
changed changed

Modifié par gordonbrown82, 12 avril 2010 - 04:06 .


#4
Magic

Magic
  • Members
  • 187 messages
Only halfed? See ApplyEffectOnObject() in core_h.nss for details. You could check for EFFECT_TYPE_RECENTLY_STUNNED and multiply your duration as a workaround. :)

#5
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
i got it to work properly about a month ago and i didn't do much different than i am now so is there a simpler way than checking for effect_type_recently_stunned? i don't know what that means.

#6
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
some other function that can apply effects mayhaps without the modification in stun time if an object has been stunned before?

#7
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
no you were right what i did was that i had:

ApplyEffectOnObject(1, eEffect, oTarget, fDuration, stEvent.oCaster, stEvent.nAbility);



which gives a stun time of about 5 seconds no matter what the fDuration is and that happened to be exactly what i wanted to have in this case.


#8
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
not sure what the 1 means and why the stun time doesn't change if i change fDuration in that case.

#9
Magic

Magic
  • Members
  • 187 messages
Uh, a lot of info at the same time. Did you check ApplyEffectOnObject() in core_h.nss? The direct engine function to apply effects can be found there: Engine_ApplyEffectOnObject(). My workaround suggestion was absurd, actually. ~~

#10
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
YES