Applying VFX To Objects (Fails.) - RESOLVED!

After a recent interest in my NWN1 module, I decided to bite the bullet and buy NWN1: EE to fix some of the issues I have had reported by those who have tried to play my module with EE.

Now, I know my module has some very old scripts, which can certainly be written much better. However, I noticed a script that works with the Diamond version (which changes the VFX colour of an object) appears to break when used in EE.

I was trying to have to avoid completely rewriting the script (as bad as it is), because I thought there may have been a simple reason as to why this does not appear to work in EE.

So, bottom line, are applying VFX colours to object broken or require new considerations when scripting for EE?

Description of issue … Five “tubes” glow certain colours depending upon whether the player has got the correct combination or not. Depending on their selection, these tubes change colour to either red. yellow or white. Using the Diamond edition, this script works (even in its badly written old state). When run in EE, the colours do not always appear to update the objects, and just leaves them “dark” < No glowing colours at all.

I am going to try to rewrite the script to make them more efficient, but I am concerned I may be wasting my time if this ApplyEffectToObject function is “borked” with Visual Effects.

Can anyone please advise from experience?

EDIT (UPDATE): OK, After some testing, it almost appears as if you CANNOT remove a newly applied VFX before it has been displayed for at least a few seconds. (6?) These VFX were applied PERMANENTLY, until I wanted to change them via a function. However, if I try to change them prior this small delay, the removal and update appears to fail.

UPDATE 2: OK, So I have now discovered I CAN remove the effect, but applying a new one immediately afterwards appears to fail. Even if I delay the new effect by 0.1, the reapplication appears intermittent. I’ll see if I can find a minimum required (for my needs anyway).

UPDATE 3: OK, So it looks like I can “fix” the issue if I up the delay to around 0.2 seconds before reapplying a new VFX after removing a previous one. I’ll work with that, and take a look at (possibly) improving the original script, and see if I can improve on that. If not, assume the longer delay was what I needed to fix this issue, where previously none was required.

UPDATE 4: The small 0.2 second delay has fixed this issue for me. I will check for any more obvious errors and upload the EE compatible version when done. NB: If you are interested in this module (especially for EE), then please report any other issues that may need fixing after checking for latest version I upload.

Sticky VFX on placeables may be related to this kind of known bug I’m afraid; (there’s a few other odd ones too).

Might be worth logging a bug though and attach the broken script!

1 Like


Thanks for responding.

OK … Although, I am prepared to accept that while a nuisance, the issue is surmountable by using the delay. So, basically, now that i know this is required for such VFX (in this case at least), I can consider adding such delays elsewhere if need be.

I just hope there are no other potential “differences” that may bug the module … only feedback from testing will help highlight, I guess.

There is also this issue and this isn’t limited to beams, it affects non-static placeables as well

this is probably unrelated to yours, but so you know that yes EE did come with multiple regressions and so you know what to avoid

1 Like