• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Bouncing spell with dummy casters

Status
Not open for further replies.

GrapesOfWath

Sound Reviewer
Level 18
Joined
Mar 31, 2012
Messages
281
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 12
Joined
Jul 4, 2016
Messages
634
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
299
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)
 

GrapesOfWath

Sound Reviewer
Level 18
Joined
Mar 31, 2012
Messages
281
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