• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Teammate Leaving Help

Status
Not open for further replies.
Level 17
Joined
Jun 17, 2007
Messages
1,433
  • Events
    • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of (Triggering player)) and do (Actions)
        • Loop - Actions
          • Player - Make (Triggering player) treat (Picked player) as an Ally with shared vision and full shared units
Note: This leaks a force.
 
Level 6
Joined
May 13, 2005
Messages
164
Events
Player - Player 2 (Blue) leaves the game
Conditions
Actions
Player Group - Pick every player in (All players matching (((Matching player) Not equal to Player 1 (Red)) and ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))) and do (Actions)
Loop - Actions
Player - Add ((Player 2 (Blue) Current gold) / (Number of players in (All players matching (((Matching player) Not equal to Player 1 (Red)) and ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))))) to (Picked player) Current gold


This trigger is from my map. Player 1 to 7 are allies so if a player leaves, for example, Blue (player 2), his gold is split equally among the remaining players that are still in game. In this trigger, Red (player 1) doesnt get any gold because he is a computer player.
 
Status
Not open for further replies.
Top