pride2518
New Member
- Reaction score
- 4
Can anyone tell me if they see a leak in the following triggers please (That is, if you have free time)? I'm only a beginner at mapmaking. Post it if you see any leaks in one of those triggers, post it if you don't, I'll remove it from my to-check list. Thanks in advance!
Even confirming that one of them have a leak/is leakless will be kindly regarded. Rep+ to anyone who does so .
Trigger:
- LeaderBoard
- Events
- Time - Elapsed game time is 5.00 seconds
- Conditions
- Actions
- Leaderboard - Create a leaderboard for (All players) titled Kills
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked player) controller) Equal to User
- Then - Actions
- Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
- Leaderboard - Show (Last created leaderboard)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
Trigger:
- FOW
- Events
- Time - Elapsed game time is 5.00 seconds
- Conditions
- Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Buy Unit <gen>
- Loop - Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Mass <gen>
- Loop - Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Events
Trigger:
- LeaderBoard2
- Events
- Unit - A unit Dies
- Conditions
- Actions
- Set Player_Kills = (Player_Kills + 1)
- Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills
- Leaderboard - Sort (Last created leaderboard) by Value in Descending order
- Events
Trigger:
- Spawn
- Events
- Time - Every 5.00 seconds of game time
- Conditions
- Actions
- Set Temp_Point = (Center of RedB <gen>)
- If ((Player 1 (Red) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 1 (Red) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of BlueB <gen>)
- If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 2 (Blue) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of TealB <gen>)
- If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 3 (Teal) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of PurpB <gen>)
- If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 4 (Purple) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of YellowB <gen>)
- If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 5 (Yellow) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of OrangeB <gen>)
- If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 6 (Orange) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of GreenB <gen>)
- If ((Player 7 (Green) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 7 (Green) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Point = (Center of PinkB <gen>)
- If ((Player 8 (Pink) slot status) Equal to Is playing) then do (Unit - Create 1 Fiend for Player 8 (Pink) at Temp_Point facing Default building facing degrees) else do (Do nothing)
- Custom script: call RemoveLocation (udg_Temp_Point)
- Events
Trigger:
- Gold
- Events
- Unit - A unit Dies
- Conditions
- (Owner of (Killing unit)) Not equal to (Owner of (Dying unit))
- Actions
- Player - Add 1 to (Owner of (Killing unit)) Food cap
- Events
Trigger:
- Gold2
- Events
- Player - Player 1 (Red)'s Food cap becomes Equal to 50.00
- Player - Player 2 (Blue)'s Food cap becomes Equal to 50.00
- Player - Player 3 (Teal)'s Food cap becomes Equal to 50.00
- Player - Player 4 (Purple)'s Food cap becomes Equal to 50.00
- Player - Player 5 (Yellow)'s Food cap becomes Equal to 50.00
- Player - Player 6 (Orange)'s Food cap becomes Equal to 50.00
- Player - Player 7 (Green)'s Food cap becomes Equal to 50.00
- Player - Player 8 (Pink)'s Food cap becomes Equal to 50.00
- Conditions
- Actions
- Player - Set (Triggering player) Food cap to 0
- Player - Add 1 to (Triggering player) Current gold
- Events
Trigger:
- Ruler1
- Events
- Unit - A unit leaves RedB <gen>
- Unit - A unit leaves BlueB <gen>
- Unit - A unit leaves TealB <gen>
- Unit - A unit leaves PurpB <gen>
- Unit - A unit leaves YellowB <gen>
- Unit - A unit leaves OrangeB <gen>
- Unit - A unit leaves GreenB <gen>
- Unit - A unit leaves PinkB <gen>
- Conditions
- (Unit-type of (Triggering unit)) Equal to Ruler
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
- Then - Actions
- Set Temp_Point = (Center of RedB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 2 (Blue)
- Then - Actions
- Set Temp_Point = (Center of BlueB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 3 (Teal)
- Then - Actions
- Set Temp_Point = (Center of TealB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 4 (Purple)
- Then - Actions
- Set Temp_Point = (Center of PurpB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
- Then - Actions
- Set Temp_Point = (Center of YellowB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 6 (Orange)
- Then - Actions
- Set Temp_Point = (Center of OrangeB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 7 (Green)
- Then - Actions
- Set Temp_Point = (Center of GreenB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 8 (Pink)
- Then - Actions
- Set Temp_Point = (Center of PinkB <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- RulerCreate
- Events
- Time - Elapsed game time is 5.00 seconds
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 1 (Red) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in RedB <gen>)
- Unit - Create 1 Ruler for Player 1 (Red) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 2 (Blue) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in BlueB <gen>)
- Unit - Create 1 Ruler for Player 2 (Blue) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 3 (Teal) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in TealB <gen>)
- Unit - Create 1 Ruler for Player 3 (Teal) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 4 (Purple) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in PurpB <gen>)
- Unit - Create 1 Ruler for Player 4 (Purple) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 5 (Yellow) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in YellowB <gen>)
- Unit - Create 1 Ruler for Player 5 (Yellow) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 6 (Orange) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in OrangeB <gen>)
- Unit - Create 1 Ruler for Player 6 (Orange) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 7 (Green) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in GreenB <gen>)
- Unit - Create 1 Ruler for Player 7 (Green) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Player 8 (Pink) slot status) Equal to Is playing
- Then - Actions
- Set Temp_Point = (Random point in PinkB <gen>)
- Unit - Create 1 Ruler for Player 8 (Pink) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- RulerDead
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Dying unit)) Equal to Ruler
- Actions
- Game - Defeat (Owner of (Dying unit)) with the message: You lost! Your Rule...
- Events
Trigger:
- Red
- Events
- Unit - A unit enters Red <gen>
- Conditions
- Actions
- Set Temp_Point = (Center of Return Wisp <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Temp_Group = (Units owned by (Owner of (Triggering unit)) of type Fiend)
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- Set Temp_Point = (Center of RedB <gen>)
- Unit - Order (Picked unit) to Attack-Move To Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Events
Trigger:
- Rules
- Events
- Map initialization
- Conditions
- Actions
- Quest - Create a Required quest titled Goal with the description Your goal is to kil..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Quest - Create a Optional quest titled Rules with the description 1- Your Ruler is no..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Quest - Create a Required quest titled Info with the description The amount of bird ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Events
Trigger:
- Super Fiend
- Events
- Unit - A unit enters Buy Super Fiend <gen>
- Conditions
- ((Owner of (Triggering unit)) Current gold) Greater than or equal to 1
- Actions
- Set Temp_Point = (Center of Buy Unit <gen>)
- Unit - Move (Triggering unit) instantly to Temp_Point
- Custom script: call RemoveLocation (udg_Temp_Point)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
- Then - Actions
- Set Temp_Point = (Center of RedB <gen>)
- Unit - Create 1 Super Fiend for Player 1 (Red) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 2 (Blue)
- Then - Actions
- Set Temp_Point = (Center of BlueB <gen>)
- Unit - Create 1 Super Fiend for Player 2 (Blue) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 3 (Teal)
- Then - Actions
- Set Temp_Point = (Center of TealB <gen>)
- Unit - Create 1 Super Fiend for Player 3 (Teal) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 4 (Purple)
- Then - Actions
- Set Temp_Point = (Center of PurpB <gen>)
- Unit - Create 1 Super Fiend for Player 4 (Purple) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
- Then - Actions
- Set Temp_Point = (Center of YellowB <gen>)
- Unit - Create 1 Super Fiend for Player 5 (Yellow) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 6 (Orange)
- Then - Actions
- Set Temp_Point = (Center of OrangeB <gen>)
- Unit - Create 1 Super Fiend for Player 6 (Orange) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 7 (Green)
- Then - Actions
- Set Temp_Point = (Center of GreenB <gen>)
- Unit - Create 1 Super Fiend for Player 7 (Green) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Triggering unit)) Equal to Player 8 (Pink)
- Then - Actions
- Set Temp_Point = (Center of PinkB <gen>)
- Unit - Create 1 Super Fiend for Player 8 (Pink) at Temp_Point facing Default building facing degrees
- Custom script: call RemoveLocation (udg_Temp_Point)
- Else - Actions
- If - Conditions
- Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - 1)
- Events
Even confirming that one of them have a leak/is leakless will be kindly regarded. Rep+ to anyone who does so .