• 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] Lumber/Food based Clock

Status
Not open for further replies.
Level 26
Joined
Dec 30, 2007
Messages
1,554
  • Clock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Food used) Equal to 59
        • Then - Actions
          • Player - Set Player 1 (Red) Food used to 0
          • Player - Add 1 to Player 1 (Red) Current lumber
        • Else - Actions
          • Player - Add 1 to Player 1 (Red) Food used
It's working as it should, but how do I set (Player 1) as (All Players)?
I've tried with this:
  • Red Clock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_PG = (All players)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Food used) Equal to 59
        • Then - Actions
          • Player - Set Player 1 (Red) Food used to 0
          • Player - Add 1 to Player 1 (Red) Current lumber
        • Else - Actions
          • Player - Add 1 to Player 1 (Red) Food used
But I can't change (Player 1) into the new Variable.
Any idea how to fix this?
Temp_PG is a Temp Player Group.
 
Level 26
Joined
Dec 30, 2007
Messages
1,554
Seas =)
Why you don't use:
  • Player Group - Pick each Player in (All Players) and do actions
?
Because I'm stupid >.<
  • Red Clock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 (Red) Food used) Equal to 59
            • Then - Actions
              • Player - Set Player 1 (Red) Food used to 0
              • Player - Add 1 to Player 1 (Red) Current lumber
            • Else - Actions
              • Player - Add 1 to Player 1 (Red) Food used
I guess I'm doing it all wrong :S
 
Status
Not open for further replies.
Top