1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] A Player Problem

Discussion in 'Triggers & Scripts' started by Giantr, Feb 9, 2009.

  1. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    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.
     
  2. ZiggyMcjoney

    ZiggyMcjoney

    Joined:
    May 4, 2008
    Messages:
    109
    Resources:
    1
    Maps:
    1
    Resources:
    1
    A trigger will run if ANY of it's events are fired. So all you have to do is go:

    Code (Text):
    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 (Text):
    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.
     
  3. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Thank you, I didn't know that :)