Call Lightning Visual FX Broken in builder module

Information and Discussion Relating to NWN2 Scripting and Coding

Moderators: Moderator, Developer, DM

User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Call Lightning Visual FX Broken in builder module

Unread post by gedweyignasia »

I'm trying to write a script that will play the Call Lightning fx to show a creature getting hit by lightning, but it just flinches without any visual being played. The module I'm building it off of is BG9_SOZ_HAK_PLACEABLES.mod

Is there some kind of BGTSCC voodoo going on that's keeping the visual effect from appearing?

Is this something that's always broken for some reason? I could swear I saw lightning strikes for a Call Lightning type spell the Goblin Soothsayer casts in the ruins outside Beregost.

Have you successfully scripted something to use this effect before, and you can tell me what I'm doing wrong if I give you my code?
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Call Lightning Visual FX Broken in builder module

Unread post by gedweyignasia »

Code: Select all

effect eLightning = EffectNWN2SpecialEffectFile("sp_call_lightning");
ApplyEffectToObject(DURATION_TYPE_INSTANT,eLightning,oVictim,2.0f);
That does the trick for anyone struggling with a given VFX constant. Just look it up in the 2DA table and call the specific effect it references.

Return to “NWN2 Scripting”