Command Transferring?

Level 5
Joined
May 10, 2009
Messages
88
OK i'm trying to make it so that when Player One(red) leaves, his commands transfer to another playing player... I dont know how to make these smaller so im sorry for epic space. Here is what I have...

Ok so I have these:

  • Bonus Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing -bonus as An exact match
    • Conditions
      • Bonuses Greater than 0
    • Actions
      • Game - Display to (All players) the text: |cffff0000The Vampi...
      • Player - Add 60 to Player 9 (Gray) Current gold
      • Player - Add 60 to Player 10 (Light Blue) Current gold
      • Set Bonuses = (Bonuses - 1)
      • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Bonuses
And this..
  • Transfer Modes
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Trigger - Add to (This trigger) the event (Player - (Player((Integer A))) leaves the game)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 2 (Blue) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 2 (Blue) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 2 (Blue) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cff0000FFBlue has ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 3 (Teal) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 3 (Teal) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 3 (Teal) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cff00FFFFTeal has ...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 4 (Purple) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 4 (Purple) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 4 (Purple) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cff4B088APurple ha...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 5 (Yellow) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 5 (Yellow) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 5 (Yellow) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cffFFFF00Yellow ha...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
          • (Player 5 (Yellow) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 6 (Orange) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 6 (Orange) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 6 (Orange) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cffFF8000Orange ha...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
          • (Player 5 (Yellow) slot status) Not equal to Is playing
          • (Player 6 (Orange) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 7 (Green) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 7 (Green) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 7 (Green) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cff01DF01Green has...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
          • (Player 5 (Yellow) slot status) Not equal to Is playing
          • (Player 6 (Orange) slot status) Not equal to Is playing
          • (Player 7 (Green) slot status) Not equal to Is playing
        • Then - Actions
          • Trigger - Add to Music On <gen> the event (Player - Player 8 (Pink) types a chat message containing -music on as An exact match)
          • Trigger - Add to Music Off <gen> the event (Player - Player 8 (Pink) types a chat message containing -music off as An exact match)
          • Trigger - Add to Bonus Trigger <gen> the event (Player - Player 8 (Pink) types a chat message containing -bonus as An exact match)
          • Trigger - Add to Gray Revive Trigger <gen> the event (Player - Player 8 (Pink) types a chat message containing -revive gray as An exact match)
          • Trigger - Add to LB Revive Trigger <gen> the event (Player - Player 8 (Pink) types a chat message containing -revive lb as An exact match)
          • Game - Display to (All players) the text: |cffFF00FFPink has ...
        • Else - Actions
And also, another way I tried:
  • Orange leaves
    • Events
      • Player - Player 6 (Orange) leaves the game
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Orange has left the...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
          • (Player 5 (Yellow) slot status) Not equal to Is playing
          • (Player 6 (Orange) slot status) Not equal to Is playing
        • Then - Actions
          • Game - Display to (All players) the text: |cff01DF01Green has...
          • Set Commander = Player 7 (Green)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
          • (Player 2 (Blue) slot status) Not equal to Is playing
          • (Player 3 (Teal) slot status) Not equal to Is playing
          • (Player 4 (Purple) slot status) Not equal to Is playing
          • (Player 5 (Yellow) slot status) Not equal to Is playing
          • (Player 6 (Orange) slot status) Not equal to Is playing
          • (Player 7 (Green) slot status) Not equal to Is playing
        • Then - Actions
          • Game - Display to (All players) the text: |cffFF00FFPink has ...
          • Set Commander = Player 8 (Pink)
        • Else - Actions
      • Set KillAll = (Units owned by (Matching player))
      • Unit Group - Pick every unit in KillAll and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_KillAll)
Why isn't either of these working? My variable is defined as
  • Set Commander = Player 1 (Red)
 
Level 13
Joined
Mar 24, 2010
Messages
938
This would be the easiest way for you to make it work, those triggers.. aren't needed xD

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 8 (Pink) leaves the game
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 (Red) slot status) Not equal to Is playing
              • ((Player((Integer A))) controller) Equal to User
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Trigger - Add to (Bonus Trigger <gen>) the event (Player - (Player((Integer A))) types a chat message containing -bonus as An exact match)
              • Skip remaining actions
            • Else - Actions
For the leave trigger make it player 1 - 8 if thats what u want. I was lazy to type them all lol
 
Top