I've been trying to make a mini game in a small part of my map. The mini game starts when any player types -mini game.
This will create a timer and when the timer ends, each player will get one crew member at a specific location on the mini game area. It is a free for all and the players will have to kill the other players, using vendors that sells suits and bombs. The winner of the mini game receives 10,000 gold, and then the triggers are supposed to say the game is over and it removes all the created units in the area. Then it will shut off the game over trigger and turn the -mini game trigger back on. Unfortunately I cannot seem to get the game over part to work when there is one surviving unit.
Hopefully by posting my triggers, someone can find some insight into this problem that I lack. I have only been back into map making for a couple of weeks so i'm still a big noob. Help is appreciated thanks.
---------------------------------------
----------------------------------------------------------------
(the anti bug triggers simply make a timer that will reset the game after the amount of time has passed. I made this for now because I cannot solve the game over trigger problem.)
And the (color) yes trigger was originally made to spawn the unit for the player if they typed -yes. But I changed the trigger so it simply made the unit for all players.
This will create a timer and when the timer ends, each player will get one crew member at a specific location on the mini game area. It is a free for all and the players will have to kill the other players, using vendors that sells suits and bombs. The winner of the mini game receives 10,000 gold, and then the triggers are supposed to say the game is over and it removes all the created units in the area. Then it will shut off the game over trigger and turn the -mini game trigger back on. Unfortunately I cannot seem to get the game over part to work when there is one surviving unit.
Hopefully by posting my triggers, someone can find some insight into this problem that I lack. I have only been back into map making for a couple of weeks so i'm still a big noob. Help is appreciated thanks.
Trigger:
- Mini Game Start
- Events
- Player - Player 1 (Red) types a chat message containing -Mini Game as An exact match
- Player - Player 2 (Blue) types a chat message containing -Mini Game as An exact match
- Player - Player 3 (Teal) types a chat message containing -Mini Game as An exact match
- Player - Player 4 (Purple) types a chat message containing -Mini Game as An exact match
- Player - Player 5 (Yellow) types a chat message containing -Mini Game as An exact match
- Player - Player 6 (Orange) types a chat message containing -Mini Game as An exact match
- Player - Player 7 (Green) types a chat message containing -Mini Game as An exact match
- Player - Player 8 (Pink) types a chat message containing -Mini Game as An exact match
- Player - Player 9 (Gray) types a chat message containing -Mini Game as An exact match
- Player - Player 10 (Light Blue) types a chat message containing -Mini Game as An exact match
- Player - Player 11 (Dark Green) types a chat message containing -Mini Game as An exact match
- Conditions
- Actions
- Game - Display to (All players) the text: The Mini Game has b...
- Countdown Timer - Create a timer window for Mini_game_Countdown with title Mini Game Starts in...
- Countdown Timer - Start Mini_game_Countdown as a One-shot timer that will expire in 10.00 seconds
- Trigger - Turn on Red Yes <gen>
- Trigger - Turn on Blue Yes <gen>
- Trigger - Turn on Teal Yes <gen>
- Trigger - Turn on Purple Yes <gen>
- Trigger - Turn on Yellow Yes <gen>
- Trigger - Turn on Orange Yes <gen>
- Trigger - Turn on Green Yes <gen>
- Trigger - Turn on Pink Yes <gen>
- Trigger - Turn on Gray Yes <gen>
- Trigger - Turn on Light Blue YEs <gen>
- Trigger - Turn on Dark Green Yes <gen>
- Set CrewMembers = (Units in Region 197 <gen>)
- Set CrewMembers = (Units in Region 197 <gen> matching (((Triggering unit) is A structure) Equal to False))
- Set NumberOfCrewMembers = (Number of units in (Units in Region 197 <gen>))
- Set NumberOfCrewMembers = (Number of units in (Units in Region 197 <gen> matching (((Triggering unit) is A structure) Equal to False)))
- Trigger - Turn on Game Over <gen>
- Trigger - Turn on Anti Bug 3 <gen>
- Trigger - Turn on Anti Bug <gen>
- Trigger - Turn off (This trigger)
- Events
---------------------------------------
Trigger:
- Game Over
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Triggering unit)) Equal to Crew Member
- Actions
- Unit Group - Remove (Triggering unit) from CrewMembers
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in CrewMembers) Equal to 1
- (Point-value of Crew Member) Equal to 1
- Then - Actions
- Player - Add 10000 to (Owner of (Picked unit)) Current gold
- Game - Display to (All players) the text: Game Over, the fina...
- Unit Group - Pick every unit in (Units in Region 197 <gen>) and do (Unit - Remove (Picked unit) from the game)
- Trigger - Turn on Mini Game Start <gen>
- Trigger - Turn off Anti Bug <gen>
- Trigger - Turn off Anti Bug 2 <gen>
- Trigger - Turn off (This trigger)
- Else - Actions
- Game - Display to (All players) the text: A crew member has b...
- If - Conditions
- Events
----------------------------------------------------------------
(the anti bug triggers simply make a timer that will reset the game after the amount of time has passed. I made this for now because I cannot solve the game over trigger problem.)
And the (color) yes trigger was originally made to spawn the unit for the player if they typed -yes. But I changed the trigger so it simply made the unit for all players.
Trigger:
- Red Yes
- Events
- Time - Mini_game_Countdown expires
- Conditions
- Actions
- Unit - Create 1 Crew Member for Player 1 (Red) at (Center of Region 186 <gen>) facing Default building facing degrees
- Countdown Timer - Destroy Mini_game_end
- Set CrewMember = (Last created unit)
- Game - Display to Player Group - Player 1 (Red) the text: Kill everyone in th...
- Wait 120.00 seconds
- Trigger - Turn off (This trigger)
- Events