It looks like ShadoOw is right. Since there's no CastSpell... function in the way that there's PlayAnimation, all spells have to be cast from within the action queue.
Creating the invisible placeable is because spell casting requires the target to be seen by the caster, whereas any item or placeable anywhere in the module can be used as the effect creator for tracking.
I'd been under the mistaken impression that instant cast spells bypassed the queue even though they're still actions, but some quick tests show that isn't so. They simply execute immediately if nothing is queued before them.
Barring a NWNX function that allows casting outside an action, it looks like effect creators are the more reliable method for custom tracking.
Edit: On the NWNX side, from nwnx_funcs on the windows end of it:
// changes the SpellID (returned by GetEffectSpellID or GetEffectSpellIDInternal) of the last effect applied
// on oObject to iSpellID. If the last effect applied used EffectLinkEffects(...) this will affect
// all the effects linked together.
void NWNXFuncs_SetLastEffectSpellID(object oObject, int iSpellID);
That might be one way to do it, at least for servers running under nwnx. Since the Linux versions usually have all the functionality of the windows ones plus extras, I assume that funtion's in that version too.
Modifié par Failed.Bard, 23 juillet 2012 - 08:50 .