Aller au contenu

Photo

Question on EffectDispelMagicBest()


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
The second argument is described as the action to take if an effect is dispelled.  The script won't compile if I leave it blank, so I'm wondering what others have put in there.  Right now I'm just using ClearAllActions(TRUE).  There really isn't anything I want to have happen when an effect is dispelled, so I just need something that is safe and won't really do anything.

#2
kevL

kevL
  • Members
  • 4 070 messages
hey Matt,

I took a look for where they use this in the stock scripts

eg. DispelMagicWithCallback(), in "nwn2_inc_spells"

where they wrote up little 'callback' functions to increase the caster's hitpoints or pilfer magic in whatever way. I think what you're looking for is just a null function:

void NullDispelCallback()
{
  // I wish we could pass NULL as actions
}

as in

effect eDispel = EffectDispelMagicBest(nCasterLevel, NullDispelCallback());


#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Looks good! Thanks!