- Joined
- Oct 16, 2011
- Messages
- 296
Creates a wall of Rock Chunks that blocks a straight path for melee units. Lasts 3 seconds.
I messed up with the Timer and declaring the Rock Chunks' variables. Now they won't disappear after 3 seconds of being casted (unless attacked).
Can someone help me? Please.
Here are the triggers:
I messed up with the Timer and declaring the Rock Chunks' variables. Now they won't disappear after 3 seconds of being casted (unless attacked).
Can someone help me? Please.
Here are the triggers:
-
Rock Wall
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Rock Wall
-
Actions
- Set Ability_RockwallIndex = (Ability_RockwallIndex + 1)
- Set Ability_RockwallCounter[Ability_RockwallIndex] = 0
- Set Global_Point[0] = (Position of (Triggering unit))
- Set Global_Point[1] = (Target point of ability being cast)
- Set Ability_RockwallsCount = (Ability_RockwallsCount + 1)
- Destructible - Create a Rock Chunks (Wall) at Global_Point[1] facing (Random angle) with scale 1.00 and variation 0
- Set Ability_Rockwalls[Ability_RockwallsCount] = (Last created destructible)
-
For each (Integer Ability_RockwallsLoop) from 1 to 4, do (Actions)
-
Loop - Actions
- Set Ability_RockwallsCount = (Ability_RockwallsCount + 1)
- Set Ability_RockwallsAngle = ((Facing of (Triggering unit)) + 90.00)
- Set Global_Point[2] = (Global_Point[1] offset by (75.00 x (Real(Ability_RockwallsLoop))) towards Ability_RockwallsAngle degrees)
- Destructible - Create a Rock Chunks (Wall) at Global_Point[2] facing (Random angle) with scale 1.00 and variation 0
- Set Ability_Rockwalls[Ability_RockwallsCount] = (Last created destructible)
- Custom script: call RemoveLocation(udg_Global_Point[2])
-
Loop - Actions
-
For each (Integer Ability_RockwallsLoop) from 1 to 4, do (Actions)
-
Loop - Actions
- Set Ability_RockwallsCount = (Ability_RockwallsCount + 1)
- Set Ability_RockwallsAngle = ((Facing of (Triggering unit)) + 270.00)
- Set Global_Point[2] = (Global_Point[1] offset by (75.00 x (Real(Ability_RockwallsLoop))) towards Ability_RockwallsAngle degrees)
- Destructible - Create a Rock Chunks (Wall) at Global_Point[2] facing (Random angle) with scale 1.00 and variation 0
- Set Ability_Rockwalls[Ability_RockwallsCount] = (Last created destructible)
- Custom script: call RemoveLocation(udg_Global_Point[2])
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_RockwallIndex Equal to 1
-
Then - Actions
- Trigger - Turn on Rock Wall Loop <gen>
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Global_Point[0])
- Custom script: call RemoveLocation(udg_Global_Point[1])
-
Events
-
Rock Wall Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer Ability_RockwallIndexX) from 1 to Ability_RockwallIndex, do (Actions)
-
Loop - Actions
- Set Ability_RockwallCounter[Ability_RockwallIndexX] = (Ability_RockwallCounter[Ability_RockwallIndexX] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_RockwallCounter[Ability_RockwallIndexX] Equal to 3
-
Then - Actions
-
For each (Integer Ability_RockwallsCountX) from ((Ability_RockwallIndexX x 9) - 8) to (Ability_RockwallIndexX x 9), do (Actions)
-
Loop - Actions
- Destructible - Kill Ability_Rockwalls[Ability_RockwallsCountX]
- Set Ability_Rockwalls[Ability_RockwallsCountX] = Ability_Rockwalls[Ability_RockwallsCount]
- Set Ability_RockwallsCount = (Ability_RockwallsCount - 1)
- Set Ability_RockwallsCountX = (Ability_RockwallsCountX - 1)
-
Loop - Actions
-
For each (Integer Ability_RockwallsCountX) from ((Ability_RockwallIndexX x 9) - 8) to (Ability_RockwallIndexX x 9), do (Actions)
- Else - Actions
-
If - Conditions
- Set Ability_RockwallCounter[Ability_RockwallIndexX] = Ability_RockwallCounter[Ability_RockwallIndex]
- Set Ability_RockwallIndex = (Ability_RockwallIndex - 1)
- Set Ability_RockwallIndexX = (Ability_RockwallIndexX - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_RockwallIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer Ability_RockwallIndexX) from 1 to Ability_RockwallIndex, do (Actions)
-
Events