Area of Effect

Can you create AOE effects, with enter, exit and heartbeat scripts, in NWN2?
I see the EffectAreaofEffect is still in NWN2, but searching global scripts, I see no examples in the game of a call to that one that uses the script parameters, just the first VFX argument…
I’m guessing maybe you do what I want in a different way now?


int nAreaEffectId is a reference to Vfx_Persistent.2da – it contains default scripts for OnEnter/Exit/Hb, as long as the arguments don’t override them.

well, i think you’d have to setup a custom AoE in Vfx_Persistent.2da for a start …

hm. Looking at the wiki I don’t see “Reserved 2da Ranges” for Vfx_Persistent; Kaedrin’s PrC Pack seems to be using #81#95

/hope this gives you a start on things at least


Uhhh, check nwscript.nss in your game files, the script zip from the second expansion.

// Create an Area Of Effect effect in the area of the creature it is applied to.

// If the scripts are not specified, default ones will be used.
// You can also specify a tag for the effect object that will be created when
// the effect is applied.
// Brock H. - OEI 04/21/06 – Added sEffectTag - this is a tag which will
// be set on the spawned AoE object, so that it can be accessed later.
effect EffectAreaOfEffect(int nAreaEffectId, string sOnEnterScript="", string sHeartbeatScript="", string sOnExitScript="", string sEffectTag="" );


KevL, now that i see the enter, exit and HB scripts as part of the 2da record for the vfx, it all falls in to place! yes, gives me a great start and on my way.
PS. Did you have Bill the Cat as your avatar at some point in the past? or is my memory going… :slight_smile:

Gnomocratic_Agent, I’m familiar with that one, I used it a lot in NWN1. But all the EffectAreaOfEffect() calls I found in NWN2, SoZ specifically, were only giving that first parameter, never giving the script parameters, which is why I was confused.

1 Like

ya know… i might have … but if so along timeago (in a forum far away).

anyway, good intuition  :)





The “source” is the nwscript.nss which I describe, what’s happening is all the parameters besides the first one have a “default” value in the signature, the = “” , which means it’ll use the default ones, but you can still specify scripts, it’s just not “required” to fire the function.