Aller au contenu

Photo

Custom Ability Implementation


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

#1
TimelordDC

TimelordDC
  • Members
  • 923 messages
I am trying to implement a new ability and am running into problems getting the spellscript to work.

To keep it simple, I just copied the Pommel Strike talent to a different ID and pointed it to a custom spellscript. The code within the spellscript is exactly the same as the original talent_singletarget.nss but the problem is that the EVENT_TYPE_SPELLSCRIPT_IMPACT case is never entered and hence, the HandleImpact function which does all the talent-related work is never called.

Any ideas on what I am doing wrong? Should I be overriding any other stuff to achieve what I want?

#2
Challseus

Challseus
  • Members
  • 1 032 messages

TimelordDC wrote...

I am trying to implement a new ability and am running into problems getting the spellscript to work.

To keep it simple, I just copied the Pommel Strike talent to a different ID and pointed it to a custom spellscript. The code within the spellscript is exactly the same as the original talent_singletarget.nss but the problem is that the EVENT_TYPE_SPELLSCRIPT_IMPACT case is never entered and hence, the HandleImpact function which does all the talent-related work is never called.

Any ideas on what I am doing wrong? Should I be overriding any other stuff to achieve what I want?


Ahem, nothing to see here, carry on, read your post wrong Image IPB

EDIT - I think the issue may be that you changed the ID. Why not try keeping the same ID, just override the ability in your M2DA (i.e. ABI_Timelord, or whatever you call it), and point it to the custom script. Then, your functionality should run.

In fact, in my module, I override Pommel Strike to do some other special stuff, and this is how I do it.

Modifié par Challseus, 08 mai 2010 - 10:10 .


#3
TimelordDC

TimelordDC
  • Members
  • 923 messages
Thanks for the reply.



I can do that but I need both versions of the Pommel Strike (this one is for 1H weapons) and I would need to code entirely new abilities too so I definitely need to get this working so it isn't dependent on the IDs already defined in ABI_base.

To clarify, I have the new ID defined in my own module constants file. The EVENT_TYPE_SPELLSCRIPT_PENDING and EVENT_TYPE_SPELLSCRIPT_CAST events are fired, only the EVENT_TYPE_SPELLSCRIPT_IMPACT is not.



I am wondering - when does the engine send the EVENT_TYPE_SPELLSCRIPT_IMPACT event?


#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
The animation associated with the ability has to have the appropriate animation event. Which animation are you using?

#5
TimelordDC

TimelordDC
  • Members
  • 923 messages
I am using the same animation as that of Pommel Strike - 2045 which ties in to talent: overrun. Where do we set the animation event?
Edit: Except for the ID, Label, Name/Desc String IDs, Guitype ID, Conditions column (0 instead of 128) and spellscript column, everything else is the same as that of Pommel Strike.

Modifié par TimelordDC, 09 mai 2010 - 02:38 .