• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Destroying My Lightning

Status
Not open for further replies.
Level 7
Joined
Oct 14, 2008
Messages
340
Okay honestly, I've looked at a few other threads about lightning effects, and DestroyLightning seems to work fine for everyone else, so what the hell is wrong with this chunk of my script?

JASS:
set light = AddLightningLoc( "CLPB", GetUnitLoc(holder), GetUnitLoc(target))
call TriggerSleepAction(0.11)
call DestroyLightning(light)
set light = null

And yes, i have a lightning local named light.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Yeah i figured that much, and switched it up, I'm still having the same problem:
JASS:
set light = AddLightning("CLPB", false, x1, y1, x2, y2)
call TriggerSleepAction(0.11)
call DestroyLightning(light)
set light = null

I tried removing the wait (knowing the lightning would be deleted immediately if it worked) and what do you know, it was destroyed and never appeared. Is there some sort of problem with the wait that's causing the lightning variable to be nullified? or..?

*edit*
After more extensive testing and poking around, I've found that for some reason the wait is causing the trigger to just stop. No actions i add after the wait ever take place, why? D:

*edit #2*
Alright i solved my own problem, I guess using waits in a function called by ForGroup() causes the function to just stop.
So i used a loop instead of ForGroup() and it worked out wonderfully, thanks for the help anyway.
 
Last edited:
Status
Not open for further replies.
Top