• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] A Player Problem

Status
Not open for further replies.
Level 5
Joined
Dec 4, 2007
Messages
111
Hello Is there such an event as "A player leaves the game" cause all I see is "A specific player(Player 1, Player 2 and so on) leaves the game". Since I want to make when the player leaves his units to be removed from the game and his resourses to be split between his allies.

P.S I don't need make a seperate trigger for every player do I.
 
Level 4
Joined
May 4, 2008
Messages
113
A trigger will run if ANY of it's events are fired. So all you have to do is go:

Code:
Events
 Player 1 (Red) leaves the game
 Player 2 (Blue) leaves the game
 etc etc, for every player

If you're lazy and dont want to have to make (potentially) 12 different events for every trigger that needs it, then you can do the following at map initialization:

Code:
For Each Integer A from 1 to 12, do:
 Loop - Actions
  Add to <Your trigger> the event Player(Integer A) leaves the game

Hope that helps :D.
 
Status
Not open for further replies.
Top