• 🏆 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!

[Trigger] Bouncing spell with dummy casters

Status
Not open for further replies.
So I'm trying to trigger something similar to a chain lightning effect where a spell will bounce once for each time it's been leveled up.
Here's what I have
upload_2018-12-30_13-8-59.png

and it's looping through like it should, but for some reason, it's only casting the spell on the first loop, and then seemingly doing nothing for any additional loops. What am I doing wrong here?
 
Level 11
Joined
Jul 4, 2016
Messages
627
First things first, do starts the effect of an ability, and change casting to triggering unit.

If it has a casting time, or the expiration timer is too short, it won't be able to use in time. Are the units increasing their distance from each other? If so, maybe the range is too short.

Also use your own loop variable, as that could cause problems if someone else decided to cast the spell.
 
Level 13
Joined
Jun 23, 2009
Messages
300
Granted there may be more problems with the spell (^see above), the most glaring issue is that the loop may be targeting the same unit over and over. To avoid that put the "Set TmpGroup2" line before the loop (it should be executed once anyway, having it inside the loop is a waste) and remove RootsRandomTarget from the group (in the loop)
 
First things first, do starts the effect of an ability, and change casting to triggering unit.

If it has a casting time, or the expiration timer is too short, it won't be able to use in time. Are the units increasing their distance from each other? If so, maybe the range is too short.

Also use your own loop variable, as that could cause problems if someone else decided to cast the spell.

Granted there may be more problems with the spell (^see above), the most glaring issue is that the loop may be targeting the same unit over and over. To avoid that put the "Set TmpGroup2" line before the loop (it should be executed once anyway, having it inside the loop is a waste) and remove RootsRandomTarget from the group (in the loop)

Yeet
upload_2018-12-30_13-44-58.png

there's what I have now, and everything seems to be working properly
thanks y'all :*
I will say though that the reason I was re-declaring the unit group in the loop was so that units moving out of range wouldn't screw up the spell
 
Last edited:
Status
Not open for further replies.
Top