How can i detect a players wood amount?

CAPSLOCKFTW

Member
Reaction score
5
How can I detect each players current wood?

On my map first a trigger sets players wood to an amount then another trigger adds some, i need my trigger to get all of the players wood and do different action for each player depending on the amount of wood he has.

I'm having an hard time making a trigger witch executes after 20secs from game beginning, reads all players current wood amount and spawns a different character for each of them.
I'm trying to do it full GUI and with minimal variable amount.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • (Player 1 (Red) Current lumber) Equal to 20

COnditions -> Integer Comparison -> Player - Player Property.
 

CAPSLOCKFTW

Member
Reaction score
5
Is there a way to make a trigger event that activates when any of the players reaches a wood amount?

Ty for your help :)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red)'s Current lumber becomes Greater than or equal to 20.00
    • Conditions
      • (Player 1 (Red) slot status) Equal to Is playing
    • Actions
      • Unit - Create 1000000 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

Like this?
PS: Dont test this one you will die from lag.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
I see you wanted all players
Trigger:
  • Melee Initialization
    • 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
              • ((Picked player) Current lumber) Greater than or equal to 20
            • Then - Actions
              • Do Actions
            • Else - Actions
 

CAPSLOCKFTW

Member
Reaction score
5
I see you wanted all players
Trigger:
  • Melee Initialization
    • 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
              • ((Picked player) Current lumber) Greater than or equal to 20
            • Then - Actions
              • Do Actions
            • Else - Actions

Yea.. not really the thing i wanted ;). needed it to do different thing for each player

anyway i got my other idea working (but i think its full of leaks(im not really sure what they are yet:D)).
 

CAPSLOCKFTW

Member
Reaction score
5
A piece of First trigger
Trigger:
  • Show Class
    • Events
      • Dialog - A dialog button is clicked for D_Race
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to R_Bloodelf
        • Then - Actions
          • Player - Set (Triggering player) Current lumber to 1
          • Dialog - Clear D_Class
          • Dialog - Change the title of D_Class to Select ur BloodElf ...
          • Dialog - Create a dialog button for D_Class labelled Hunter
          • Set X_Hunter = (Last created dialog Button)
          • Dialog - Create a dialog button for D_Class labelled Mage
          • Set X_Mage = (Last created dialog Button)
          • Dialog - Create a dialog button for D_Class labelled Paladin
          • Set X_Paladin = (Last created dialog Button)
          • Dialog - Create a dialog button for D_Class labelled Priest
          • Set X_Priest = (Last created dialog Button)
          • Dialog - Create a dialog button for D_Class labelled Rouge
          • Set X_Rouge = (Last created dialog Button)
          • Dialog - Create a dialog button for D_Class labelled Warlock
          • Set X_Warlock = (Last created dialog Button)
          • Dialog - Show D_Class for (Triggering player)
        • Else - Actions

And a piece of second
Trigger:
  • AnalyzeNCreate
    • Events
      • Dialog - A dialog button is clicked for D_Class
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to X_Mage
        • ((Triggering player) Current lumber) Equal to 17
      • Then - Actions
        • Unit - Create 1 Human Mage for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Clicked dialog button) Equal to X_Mage
            • ((Triggering player) Current lumber) Equal to 9
          • Then - Actions
            • Unit - Create 1 Undead Mage for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Clicked dialog button) Equal to X_Mage
                • ((Triggering player) Current lumber) Equal to 1
              • Then - Actions
                • Unit - Create 1 Blood Elf Mage for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Clicked dialog button) Equal to X_Mage
                    • ((Triggering player) Current lumber) Equal to 11
                  • Then - Actions
                    • Unit - Create 1 Draenei Mage for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
                  • Else - Actions


The second trigger identifies the race by wood and makes the racial unit. In this case Blood Elf Mage.
It's a different idea than what i first thought. I cut 1 trigger of the middle, redid it and it got shorter, easyer, better ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top