- Joined
- May 13, 2023
- Messages
- 72
Hi hive, I have this simple Spell that slows target enemy unit and when an ally attacks the target it gets a speed bonus and it works but 1 small thing is I don't know how to set the level of the Speed bonus ability
Heres the code
Initialization Trigger
Heres the code
Initialization Trigger
-
Divine Deceleration Init
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Divine Deceleration
-
-
Actions
-
Set DivineDecelerationINDEX = (DivineDecelerationINDEX + 1)
-
Set DivineDecelerationCaster[DivineDecelerationINDEX] = (Triggering unit)
-
Set DivineDecelerationTarget[DivineDecelerationINDEX] = (Target unit of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DivineDecelerationINDEX Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Divine Deceleration End <gen>
-
Trigger - Turn on Divine Deceleration Bonus <gen>
-
-
Else - Actions
-
-
-
-
Divine Deceleration End
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer DivineDecelerationLOOP) from 1 to DivineDecelerationINDEX, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(DivineDecelerationTarget[DivineDecelerationLOOP] has buff Divine Deceleration ) Equal to True
-
-
Then - Actions
-
Else - Actions
-
Set DivineDecelerationCaster[DivineDecelerationLOOP] = DivineDecelerationCaster[DivineDecelerationINDEX]
-
Set DivineDecelerationTarget[DivineDecelerationLOOP] = DivineDecelerationTarget[DivineDecelerationINDEX]
-
Set DivineDecelerationINDEX = (DivineDecelerationINDEX - 1)
-
Set DivineDecelerationLOOP = (DivineDecelerationLOOP - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DivineDecelerationINDEX Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off Divine Deceleration Bonus <gen>
-
-
Else - Actions
-
-
-
-
-
-
-
-
Divine Deceleration Bonus
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
((Triggering unit) has buff Divine Deceleration ) Equal to True
-
-
Actions
-
Unit - Create 1 Dummy (Nothing) for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
-
Unit - Add Divine Deceleration (Dummy) to (Last created unit)
-
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Attacking unit)
-
Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
-
-