Hi people! I would like to ask for a little help!
So I'm trying to make a trigger where, there would be multiple units doing things.
There is a variable, lets call it Yeeter.
Yeeter would yell "Yeet" when it takes damage, for fun purposes. Would use different sounds/voices with the same method.
It works perfectly fine If I'm doing it with one unit at the same time. The problem starts when I wanna spawn more units with Create trigger, and make them do the thing at the same time.
So I made a trigger, Create 4 units to a place, and then I wanted to use the Set command.
So I created a Variable, selected type Unit, named it Yeeter.
Set Yeeter = (Last created unit) - I hoped this will include all 4 units, I was wrong.
Here comes the problem, only one of the 4 units will do the things I want, not all 4 of them.
Is there a way to add more unit to the same Variable? Adding a counter maybe?
My trigger so far looks this
Events
- Unit - A unit owned by Player 12 (brown) Is attacked. (because I cannot pick "takes damage" Altho I would like to do that to be honest.)
Conditions
- (Triggering unit) Equal to Yeeter
Actions
- Sound Play Yeet(Random Integer number between 1 and 3) at 100% volume, attached to Yeeter. - got multiple sounds to randomize, already made that trigger, that works.
- Animation - Play Yeeter's spell animation.
The problem with "Is attacked". for me is that, for AoE damage, it still will register one unit, because that is "attacked" the others around it are just taking damage but not targeted as "attacked" units.
I hope my jibberish is understandeable XD Thanks for the help!
So I'm trying to make a trigger where, there would be multiple units doing things.
There is a variable, lets call it Yeeter.
Yeeter would yell "Yeet" when it takes damage, for fun purposes. Would use different sounds/voices with the same method.
It works perfectly fine If I'm doing it with one unit at the same time. The problem starts when I wanna spawn more units with Create trigger, and make them do the thing at the same time.
So I made a trigger, Create 4 units to a place, and then I wanted to use the Set command.
So I created a Variable, selected type Unit, named it Yeeter.
Set Yeeter = (Last created unit) - I hoped this will include all 4 units, I was wrong.
Here comes the problem, only one of the 4 units will do the things I want, not all 4 of them.
Is there a way to add more unit to the same Variable? Adding a counter maybe?
My trigger so far looks this
Events
- Unit - A unit owned by Player 12 (brown) Is attacked. (because I cannot pick "takes damage" Altho I would like to do that to be honest.)
Conditions
- (Triggering unit) Equal to Yeeter
Actions
- Sound Play Yeet(Random Integer number between 1 and 3) at 100% volume, attached to Yeeter. - got multiple sounds to randomize, already made that trigger, that works.
- Animation - Play Yeeter's spell animation.
The problem with "Is attacked". for me is that, for AoE damage, it still will register one unit, because that is "attacked" the others around it are just taking damage but not targeted as "attacked" units.
I hope my jibberish is understandeable XD Thanks for the help!