• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Lumber/Food based Clock

Status
Not open for further replies.
Level 25
Joined
Dec 30, 2007
Messages
1,549
  • 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 25
Joined
Dec 30, 2007
Messages
1,549
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