- Joined
- Dec 8, 2016
- Messages
- 127
Just a simple trigger for my rts map that i want to remove certain destructibles if player doesnt start at that location, & I am sure that regions are in correct position, but why the result just seem strange, it doesnt correctly remove destrutibles, sometimes it does, sometimes doesnt.
Nevermind the leaks, i just testing.
Nevermind the leaks, i just testing.
-
Beginning townhall
-
Events
- Time - Elapsed game time is 0.00 seconds
- Conditions
-
Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Set PlayerLoc = ((Picked player) start location)
- Unit - Create 1 Village Hall First real for (Picked player) at PlayerLoc facing Default building facing degrees
- -------- Below for "income daily effect" --------
- Set TownHallFirst[1] = (Last created unit)
- Unit Group - Add TownHallFirst[1] to TownhallDetect
- -------- Below for "Building damage effect" --------
- Unit Group - Add TownHallFirst[1] to BuidingSmoke
- Unit - Create 1 Child for (Picked player) at (PlayerLoc offset by 400.00 towards ((Angle from PlayerLoc to CenterMap) - 30.00) degrees) facing (Angle from PlayerLoc to CenterMap) degrees
- Unit - Create 1 Lumberjack for (Picked player) at (PlayerLoc offset by 400.00 towards ((Angle from PlayerLoc to CenterMap) - 15.00) degrees) facing (Angle from PlayerLoc to CenterMap) degrees
- Unit - Create 1 Woman (Female) for (Picked player) at (PlayerLoc offset by 400.00 towards (Angle from PlayerLoc to CenterMap) degrees) facing (Angle from PlayerLoc to CenterMap) degrees
- Unit - Create 1 Child (2) for (Picked player) at (PlayerLoc offset by 400.00 towards ((Angle from PlayerLoc to CenterMap) + 15.00) degrees) facing (Angle from PlayerLoc to CenterMap) degrees
- Camera - Set (Picked player)'s camera Distance to target to 2400.00 over 0.00 seconds
- Custom script: call RemoveLocation (udg_PlayerLoc)
-
Loop - Actions
- Trigger - Turn on New units appear <gen>
- Trigger - Turn on Camera view restore Copy 3 <gen>
-
Unit Group - Pick every unit in BuidingSmoke and do (Actions)
-
Loop - Actions
- Set TownHallFirst[5] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 1 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[1] = (TownStart[1] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 2 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[2] = (TownStart[2] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 3 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[3] = (TownStart[3] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 4 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[4] = (TownStart[4] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 5 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[5] = (TownStart[5] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 6 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[6] = (TownStart[6] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 7 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[7] = (TownStart[7] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Start 8 <gen> contains TownHallFirst[5]) Equal to False
-
Then - Actions
- Set TownStart[8] = (TownStart[8] + 1)
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Set TownStart[20] = (Number of units in BuidingSmoke)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[1] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 1
-
Destructible - Pick every destructible in Test castle 1 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[1] = (Picked destructible)
- Destructible - Remove Wall[1]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[2] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 2
-
Destructible - Pick every destructible in Test castle 2 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[2] = (Picked destructible)
- Destructible - Remove Wall[2]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[3] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 3
-
Destructible - Pick every destructible in Test castle 3 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[3] = (Picked destructible)
- Destructible - Remove Wall[3]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[4] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 4
-
Destructible - Pick every destructible in Test castle 4 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[4] = (Picked destructible)
- Destructible - Remove Wall[4]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[5] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 5
-
Destructible - Pick every destructible in Test castle 5 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[5] = (Picked destructible)
- Destructible - Remove Wall[5]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[6] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 6
-
Destructible - Pick every destructible in Test castle 6 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[6] = (Picked destructible)
- Destructible - Remove Wall[6]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[7] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 7
-
Destructible - Pick every destructible in Test castle 7 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[7] = (Picked destructible)
- Destructible - Remove Wall[7]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TownStart[8] Equal to TownStart[20]
-
Then - Actions
- Game - Display to (All players) the text: start 8
-
Destructible - Pick every destructible in Test castle 8 <gen> and do (Actions)
-
Loop - Actions
- Set Wall[8] = (Picked destructible)
- Destructible - Remove Wall[8]
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Events
- [trigger]
- [hidden]