Hey guys! I was wondering if i could get some help on my map with something. It is a 4 player TD map. First off will these trigger conditions (The "Or" conditions) i am using work? I want 3/4 players to be ready to start the wave trigger (this trigger). Also, What i want to do is have some conditions that when a player leaves, all of his spawns are disabled. (and units killed as well but i should be able to figure that out.)
Below is my trigger (Took out a few un needed parts for the sake of the people reading it)
If you could point me in some direction or tell me what i can do to make it work the way i described would be so much appreciated.
There is a specific and very VERY convenient condition that makes the trigger fire when the player leaves the game. The condition is called Player Leaves Game and I believe that the trigger would work well. I wish I could help you more but I'm slowly learning the trigger n data editor.
There is a specific and very VERY convenient condition that makes the trigger fire when the player leaves the game. The condition is called Player Leaves Game and I believe that the trigger would work well. I wish I could help you more but I'm slowly learning the trigger n data editor.
I have found that the "player Leaves game" event does not work.
I do believe maps have a built in map trigger that does the split resources we see when players leave games but i have no idea how to access it
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
Melee Initialization
Events
Local Variables
3/4 = 0 <Integer>
PlayerReady = false <Boolean[4]>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
3/4 < 3
Then
Variable - Set 3/4 = 0
General - Pick each integer from 1 to 4, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
PlayerReady[(Picked integer)] == true
Then
Variable - Modify 3/4: + 1
Else
Do Nothing
Trigger - Run (Current trigger) (Check Conditions, Wait until it finishes)
Else
Do Whatever were doing
In my map i do a check every 60 secs for inactives players:
PlayersLeaves
Events
Timer - Every 60.0 seconds of Game Time
Local Variables
pcounter = 0 <Integer[12]>
Conditions
(Number of players in (Active Players)) != p#Active
gVictoryDefeat == false
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Picked player)) == Left The Game
pLeftGame[(Picked player)] == false
Then
Variable - Set pLeftGame[(Picked player)] = true
General - Switch (Actions) depending on ((Picked player) is in pg##########)
Cases
General - If (true)
Actions
------- Player Is #####
Player Group - Remove player (Picked player) from pg###
Player Group - Add player (Picked player) to pg###AI
Variable - Modify p#Active: - 1
Player Group - Pick each player in pg##### and do (Actions)
Actions
Variable - Modify pcounter[(Picked player)]: + 1
Variable - Set p#T### = pcounter[(Picked player)]
General - Wait 0.5 Real Time seconds
Dialog - Destroy dMainWindow
Trigger - Run Leaderboard (Check Conditions, Don't Wait until it finishes)
Trigger - Run v##### (Check Conditions, Don't Wait until it finishes)
Trigger - Turn g####AI On
Default
------- Player Is #####
Player Group - Remove player (Picked player) from pg#####
Player Group - Remove player (Picked player) from pg############
Player Group - Remove player (Picked player) from pg############
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
Variable - Modify p#Active: - 1
Player Group - Pick each player in pg### and do (Actions)
Actions
Variable - Modify pcounter[(Picked player)]: + 1
Variable - Set p#P##### = pcounter[(Picked player)]
General - Wait 0.5 Real Time seconds
Dialog - Destroy dMainWindow
Trigger - Run Leaderboard (Check Conditions, Don't Wait until it finishes)
Trigger - Run vT### (Check Conditions, Don't Wait until it finishes)
Else
Where you spawn the units you could simply do a
Pick each interger 1 to 4 and do
If
pLeftGame[(Picked player)] == false
THen
spawn units
Else
do nothing
i used less than 3 because it is a loop that basically checks if the variable is less than 3 itll rerun and check again untill 3 ppl are ready. The trigger i use up there is just for all players. so it checks every 60 seconds if players have left and does the actions. Also on its first run itll set the variable to true so that whn it runs for the next time it wont do actions for said left players.
You could do it for each player if you wish. and would just check player1=has left and pleft[1] = false and then do these actions. Turn this trigger off and set pleft[1] = true.
i used less than 3 because it is a loop that basically checks if the variable is less than 3 itll rerun and check again untill 3 ppl are ready.The trigger i use up there is just for all players. so it checks every 60 seconds if players have left and does the actions. Also on its first run itll set the variable to true so that whn it runs for the next time it wont do actions for said left players.
You could do it for each player if you wish. and would just check player1=has left and pleft[1] = false and then do these actions. Turn this trigger off and set pleft[1] = true.
So i'm most likely going to have to re-do my spawn waves triggers? Because i have player ready variables that will have to be changed, spawning that has to be changed as well as if multiple players leave, multiple spawns will have to be disabled
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys! I was wondering if i could get some help on my map with something. It is a 4 player TD map. First off will these trigger conditions (The "Or" conditions) i am using work? I want 3/4 players to be ready to start the wave trigger (this trigger). Also, What i want to do is have some conditions that when a player leaves, all of his spawns are disabled. (and units killed as well but i should be able to figure that out.)
Below is my trigger (Took out a few un needed parts for the sake of the people reading it)
If you could point me in some direction or tell me what i can do to make it work the way i described would be so much appreciated.
Thanks alot!
I'm heading out but i will try to get back after i get back. Thanks for any help you have, i know it's kind of alot to ask
@copperfront: Go
There is a specific and very VERY convenient condition that makes the trigger fire when the player leaves the game. The condition is called Player Leaves Game and I believe that the trigger would work well. I wish I could help you more but I'm slowly learning the trigger n data editor.
I have found that the "player Leaves game" event does not work.
I do believe maps have a built in map trigger that does the split resources we see when players leave games but i have no idea how to access it
Melee Initialization
Events
Local Variables
3/4 = 0 <Integer>
PlayerReady = false <Boolean[4]>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
3/4 < 3
Then
Variable - Set 3/4 = 0
General - Pick each integer from 1 to 4, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
PlayerReady[(Picked integer)] == true
Then
Variable - Modify 3/4: + 1
Else
Do Nothing
Trigger - Run (Current trigger) (Check Conditions, Wait until it finishes)
Else
Do Whatever were doing
In my map i do a check every 60 secs for inactives players:
PlayersLeaves
Events
Timer - Every 60.0 seconds of Game Time
Local Variables
pcounter = 0 <Integer[12]>
Conditions
(Number of players in (Active Players)) != p#Active
gVictoryDefeat == false
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Picked player)) == Left The Game
pLeftGame[(Picked player)] == false
Then
Variable - Set pLeftGame[(Picked player)] = true
General - Switch (Actions) depending on ((Picked player) is in pg##########)
Cases
General - If (true)
Actions
------- Player Is #####
Player Group - Remove player (Picked player) from pg###
Player Group - Add player (Picked player) to pg###AI
Variable - Modify p#Active: - 1
Player Group - Pick each player in pg##### and do (Actions)
Actions
Variable - Modify pcounter[(Picked player)]: + 1
Variable - Set p#T### = pcounter[(Picked player)]
General - Wait 0.5 Real Time seconds
Dialog - Destroy dMainWindow
Trigger - Run Leaderboard (Check Conditions, Don't Wait until it finishes)
Trigger - Run v##### (Check Conditions, Don't Wait until it finishes)
Trigger - Turn g####AI On
Default
------- Player Is #####
Player Group - Remove player (Picked player) from pg#####
Player Group - Remove player (Picked player) from pg############
Player Group - Remove player (Picked player) from pg############
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Picked player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
Variable - Modify p#Active: - 1
Player Group - Pick each player in pg### and do (Actions)
Actions
Variable - Modify pcounter[(Picked player)]: + 1
Variable - Set p#P##### = pcounter[(Picked player)]
General - Wait 0.5 Real Time seconds
Dialog - Destroy dMainWindow
Trigger - Run Leaderboard (Check Conditions, Don't Wait until it finishes)
Trigger - Run vT### (Check Conditions, Don't Wait until it finishes)
Else
Where you spawn the units you could simply do a
Pick each interger 1 to 4 and do
If
pLeftGame[(Picked player)] == false
THen
spawn units
Else
do nothing
for the first trig, why do you do "if 3/4 < 3"? Why not "if 3/4 >= 3?"
and how can i incorporate pLeftGame variable? Would i have separate triggers for if p1 left, p2 left and so on?
i used less than 3 because it is a loop that basically checks if the variable is less than 3 itll rerun and check again untill 3 ppl are ready. The trigger i use up there is just for all players. so it checks every 60 seconds if players have left and does the actions. Also on its first run itll set the variable to true so that whn it runs for the next time it wont do actions for said left players.
You could do it for each player if you wish. and would just check player1=has left and pleft[1] = false and then do these actions. Turn this trigger off and set pleft[1] = true.
So i'm most likely going to have to re-do my spawn waves triggers? Because i have player ready variables that will have to be changed, spawning that has to be changed as well as if multiple players leave, multiple spawns will have to be disabled