Hello , sorry my english in not good
I'm using YDWE and I have a problem in my map , I've created an item and every 1 second it shoots a fire ball to a random nearby enemy unit and damage all units passes through.
I want it to damage each unit once and so I created a loop trigger for each player but the problem is it only works for "Player 1" correctly.
When "Player 1" has the item , it will damage each unit once but when other players have the item , it damages each unit multiple times.
I'm using YDWE and I have a problem in my map , I've created an item and every 1 second it shoots a fire ball to a random nearby enemy unit and damage all units passes through.
I want it to damage each unit once and so I created a loop trigger for each player but the problem is it only works for "Player 1" correctly.
When "Player 1" has the item , it will damage each unit once but when other players have the item , it damages each unit multiple times.
-
Blazing Ball
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Loop the integer A from 1 to 5
-
Loop - Actions
-
If-Then-Else
-
If - Conditions
-
((PlayerHero[Loop Integer A [R]] Health is greater than zero) Equal to True) and (((PlayerHero[Loop Integer A [R]] held by Blazing Ball) is held) Equal to True)
-
-
Then - Actions
-
If-Then-Else
-
If - Conditions
-
(Number of units in (All units with a radius of 750.00 and a center of (PlayerHero[Loop Integer A [R]] location) that satisfy ((((Matching unit) Health is greater than zero) Equal to True) and (((Matching unit) is the hostile unit of (PlayerHero[Loop Integer Greater than or equal to 1
-
-
Then - Actions
-
Group - Clear all units in BlazingBallGroupDmged[Loop Integer A [R]]
-
Set BlazingBallUnit[Loop Integer A [R]] = PlayerHero[Loop Integer A [R]]
-
Set BlazingBallTarget[Loop Integer A [R]] = (A randomly selected unit in (All units with a radius of 750.00 and a center of (PlayerHero[Loop Integer A [R]] location) that satisfy ((((Matching unit) Health is greater than zero) Equal to True) and (((Matching unit) is the hostile unit of (PlayerHero[Loop
-
Unit - Create 1 Blazing Flame Dummy for (PlayerHero[Loop Integer A [R]] owner) at (PlayerHero[Loop Integer A [R]] location), facing (BlazingBallTarget[Loop Integer A [R]] location)
-
Set BlazingBallDummy[Loop Integer A [R]] = (Last unit created)
-
Unit - Set the custom value of (Last unit created) to Loop Integer A [R]
-
Unit - Delete 0.50 after (Last unit created) seconds
-
[System] - Command (Last unit created) to jump in the direction of (PlayerHero[Loop Integer A [R]] to BlazingBallTarget[Loop Integer A [R]] angle), the distance is 750.00, the duration is 0.50, the refresh cycle is 0.02, the maximum height is 0.00, which causes damage to passing enemies Value 0.00, add special effect chest to the enemy's Holy Light Void.mdx.
-
-
Else - Actions
-
Do nothing
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
-
Blazing Ball Dmg
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
Loop the integer A from 1 to 5
-
Loop - Actions
-
If-Then-Else
-
If - Conditions
-
(BlazingBallDummy[Loop Integer A [R]] owner) Equal to (player Loop Integer A [R])
-
-
Then - Actions
-
Set BlazingBallGroup[Loop Integer A [R]] = (All units with a radius of 120.00 and a center of (BlazingBallDummy[Loop Integer A [R]] location) that satisfy ((((Matching unit) Health is greater than zero) Equal to True) and (((Matching unit) is the hostile unit of (BlazingBallDummy[Loop Integer A [R]] o
-
Group - Select all units in BlazingBallGroup[Loop Integer A [R]] to perform actions
-
Loop - Actions
-
If-Then-Else
-
If - Conditions
-
((Select unit) in BlazingBallGroupDmged[Loop Integer A [R]]) Equal to True
-
-
Then - Actions
-
Do nothing
-
-
Else - Actions
-
Unit - Command PlayerHero[Loop Integer A [R]] to cause (Select unit) damage to 4500.00, attack type: Normal damage type: Normal
-
Special Effect - Create and bind special effects to chest to (Select unit), use model: Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-
Special Effect - Delete 0.50 after (The last special effect created) seconds
-
Group - Add (Select unit) to BlazingBallGroupDmged[Loop Integer A [R]]
-
-
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-