Aller au contenu

Photo

Spellscript wrappers


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

#1
FergusM

FergusM
  • Members
  • 460 messages
I made an M2DA that changes the spell script of devour to the following:

void main()
{     
    event ev = GetCurrentEvent();
     DisplayFloatyMessage(GetEventCreator(ev),"Test.");
     HandleEvent(ev,R"talent_devour.ncs"); //also tried with .nss
}

The text displays, but the ability does not fire. I can't understand why, it should be straightfoward to simply pass the event on.

Sidenote: The text displays three times, I guess there are events like CAST, PENDING and IMPACT, is that right? There is also a literal case in the devour script, so I'm not totally sure what the sequence of events is. Any hints?


EDIT: Rather embarrassingly, it appears that Devour plays no animation if there is not a corpse nearby, so the ability was working all along. I'd still appreciate some info on the sidenote?

Modifié par FergusM, 14 juillet 2010 - 02:02 .


#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
The sequence is PENDING, CAST and IMPACT.



The literal case is a custom event that is fired every time a corpse is targeted (the projectile goes and hits the bodybag) and the healing is handled within the custom event.



SetProjectileImpactEvent(oProjectile, ev) is the command to note here since it replaces the default event on projectile impact with the custom one.

#3
FergusM

FergusM
  • Members
  • 460 messages
By the way, I'd like to note that whomever at Bioware used '90210' as an arbitrary literal in this script is awesome. Made me smile when I finally got it.

Modifié par FergusM, 15 juillet 2010 - 12:56 .


#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
You can thank Peter Thomas for that. Georg picked on him a bit for it if I recall.