Swinging Blade Woes
Zephirius
Member Posts: 419
I've stripped this bit of code down to just the VFX part for testing purposes. I can't for the life of me, get the effect to work! No blades. No Jack. Bupkis!
With the same bit of code, it worked in the past. I wonder what's happening so that the blades don't even show up??? Thanks guys,
I've coded it this way. Still nothing.
This way -
Still nothing after applying effect at location lLoc. Can anyone think of a reason why it's a no show. Is the code correct. I do believe it is.
With the same bit of code, it worked in the past. I wonder what's happening so that the blades don't even show up??? Thanks guys,
void main() { object oPC = GetEnteringObject(); if (!GetIsPC(oPC)) return; effect eSwing = EffectVisualEffect(VFX_FNF_SWINGING_BLADE); ApplyEffectToObject(DURATION_TYPE_INSTANT, eSwing, oPC); }
I've coded it this way. Still nothing.
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_SWINGING_BLADE_TRAP), oPC);
This way -
location lLoc = GetLocation(GetWaypointByTag("WP_BLADES")); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_SWINGING_BLADE_TRAP), lLoc);
Still nothing after applying effect at location lLoc. Can anyone think of a reason why it's a no show. Is the code correct. I do believe it is.
Post edited by Zephirius on
0
Comments
It looks like the script either hasn't been compiled or the script has not been called for in the on_enter slot for the object (assuming it is a generic trigger).
I suggest you try adding the effect using a DelayCommand of around a quarter second (0.25) and see if that makes a difference.
Edit: I tried it in a test module with no delay and I got not one but four swinging blades, alternately swinging in different directions. It looks like that's the way it's supposed to work, though.
Second edit: My next guess is that the screen is taking more than a second to display after the PC enters the area, so by the time the display returns the FNF effect has finished (it only runs for one second by default). Maybe try longer delays before applying the effect (one second or more)?
That should display the blades for 5 seconds. DURATION_TYPE_INSTANT is intended for either effects that are immediate, permanent and that cannot be removed or fire once and forget effects.
TR
Typo. I'm using the correct constant, - VFX_FNF_SWINGING_BLADE
I'm really at a loss. Befuddled. Perplexed, confounded.
Code I used.
No idea why a tileset would override visualeffects.2da. I imagine it ships with scripts that apply VFX - if you're not using them, the impact will be zero.
A text file comparison of the two versions of visualeffects.2da (using WinMerge Compare or whatever) would reveal which effects are unique to LOK. If they matter, you could make a merged 2da for your top hak.
In general, older haks like LOK may contain 2da files that are missing lines from more recent versions of NWN.