Weird bug with visual effects and triggers - confirmation needed


#1

tl;dr: visual effects don’t get applied, either object or location, if the trigger firing the script is not detected. link to test module.

hello there,

yesterday i tried around to script a custom trap - a pressure plate, two columns left and right and a fire cone betwixt. i am a bit rusty with nwscript and tried to apply the visual effect for burning hands to an ipoint, but ingame no vfx did show. i was unsure if a visual effect can be applied to an ipoint so i got its location and applied the effect there - no vfx again. i made sure that the trigger does indeed work (debugging message came through), applied the effect directly to the first pc (object and location) and tested different vfx files (choosing from this list with confirmed effects), alas nothing worked.

to confirm that something works i painted down an average fire trap, triggered it and rejoiced as flames engulfed my character. back to my generic trigger i scrapped my script and replaced it with the fire trap script (nw_t1_fireavgc). i nearly lost my mind as my character recieved the damage but no flames.

next i deleted the generic trigger i was testing with to replace it with the average fire trap blueprint. i changed the trap type to none and used the copied fire trap script in the on enter event. everything was back to normal: both damage and visual effect were applied without issues.
afterwards i tested different trigger flags and came to the conclusion that no visual effect can be applied when the trigger is not detected. that’s why the generic trigger never did show a vfx (it’s not a trap and never detectable) and the trap blueprint shows no effect but the damage the very first time my character steps inside with a detect dc of 99. after triggering the trap gets the detected flag and the visual effect works again.

is this something new? can someone confirm that issue? i doubt that i ran into this behaviour in the past, and i am sure i successfully applied vfx effects through generic triggers earlier.

ps: i tested with an empty documents folder, with and without skywing’s client, with and without winxp sp3 compatibility mode and admin rights. i am running on win7, gtx970 driver vers 390.65.


#2

in the meantime i got my custom trap to work. applying a vfx with the function EffectNWN2SpecialEffectFile instead of using the defined entries of visualeffects.2da works.

there’s still the bug that undetected traps won’t fire visual effects. there’s something really weird going on - and i never noticed this bug. replacing EffectVisualEffect with EffectNWN2SpecialEffectFile will fix the problem though (tested).


#3

Yes, when I crank the Detect DC up to 100 in your test module, the VFX doesn’t fire when the trap is triggered. Good to know.


#4

Hi,

Do you destroy the trigger at the same time? If so, you may need to delay its destruction slightly until after the VFX has had time to begin.

Just a thought.

Lance.


#5

thanks for the responses so far.
i don’t think that destroying the trigger has anything to do with the issue. first it also appears if the trigger is not a one-shot, and second the vfx and damage is combined into an effect which is then applied. the damage comes through but the vfx is always missing if the trigger is not detected.


#6

Hi Semper,

I believe I recall some aspects of the coding will fire while other parts fail simply due to the need of a delay before destroying a trigger. Anyway, it was just a thought - no need to test if you are sure.

Lance.