• 🏆 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!

How to count how much wood is havested?

Status
Not open for further replies.
Level 11
Joined
Nov 1, 2008
Messages
828
I have tried the below method and it does not work! I have also tried "Begins casting an ability" as well. +Rep, +credit i would like to know how to do this! Thankyou :ogre_haosis:

  • Counting Points 1 Arena
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Harvest (Gold and Lumber)
    • Actions
 
Level 9
Joined
Dec 21, 2011
Messages
332
Do you mean like checking lumber on Orc Campaign collecting 50000(?) then Killing Cenarius?

EDIT : If this is what you want, how about creating a variable (real) say, Lumber.

Event - Map Initiation
Condition - ?
Action - Create Multiboard with name Lumber Collected
(put necessary other actions to suit your needs*)
Set Lumber = Lumber of Player Red
(other multiboard need*)
Show Multiboard to Player Red
(*SORRY I CANNOT REMEMBER THE FULL CODE. THIS IS OUR MOM'S COMPUTER. SHE DON'T HAVE WARCRAFT TO VERIFY OTHER ACTIONS THAT I THINK THAT DOESN'T EXIST.)
Event - Every 0.5 seconds of gametime
Condition - Lumber is Equals to 50000 = False *
Action - Show to Multiboard Lumber to Player Red*
IF THEN ELSE
If - Lumber = 50000
Then - Game show message - " You have reached 50000 Lumber " for X seconds
Else -
 
Last edited:
Level 9
Joined
Dec 21, 2011
Messages
332
Ah. Sorry for that. XD.

So did you try Wisp style? Change it into +1 lumber only per interval. If you don't want it to be seen try a dummy unit. Plus it is easier to use this technique because it doesn't have triggers.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Wait, if each time the Peasant is harvesting (hitting) the trees, he will get a resource on his hand (carrying a sack of gold or stack of lumber), where will he return this resource too?

So, the player will get x2 the resource ?
One time for hitting the trees and one time for returning the resource to your Town Hall ?
 
Level 11
Joined
Nov 1, 2008
Messages
828
Wait, if each time the Peasant is harvesting (hitting) the trees, he will get a resource on his hand (carrying a sack of gold or stack of lumber), where will he return this resource too?

So, the player will get x2 the resource ?
One time for hitting the trees and one time for returning the resource to your Town Hall ?

Even if that was true, i wouldn't know because it displays as 0.
 
Level 11
Joined
Nov 1, 2008
Messages
828
There is a way to detect an order string which is harvest.
But when it is ordered from feets away from the trees, is still fires that Event order making it will gain +1 lumber even before the Peasant is cutting the tree.

Do show, all i want it to do is to show how much lumber has been havested on a leaderboard and to have in total of how much wood was havested.
 
Level 16
Joined
May 2, 2011
Messages
1,345
I copied this trigger from orc's campaign

  • Victory Condition
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (AAAP_Orcs Current lumber) Greater than or equal to 15000
      • InCinematic Equal to False
      • GameOver Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Set GameOver = True
      • Unit - Make Grom Invulnerable
      • Wait 2.00 seconds
      • Trigger - Add Victory Q <gen> to the trigger queue (Checking conditions)
 
Level 11
Joined
Nov 1, 2008
Messages
828
I copied this trigger from orc's campaign

  • Victory Condition
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (AAAP_Orcs Current lumber) Greater than or equal to 15000
      • InCinematic Equal to False
      • GameOver Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Set GameOver = True
      • Unit - Make Grom Invulnerable
      • Wait 2.00 seconds
      • Trigger - Add Victory Q <gen> to the trigger queue (Checking conditions)

This trigger doesn't help me, i need to count each lumber that is havested to be given a position/rank/score at the end. There has to be a way!
 
Level 13
Joined
Sep 13, 2010
Messages
550
Harvest abilities does not behave as normal abilities, just like reincarnation it can't be detected. The best is to do:

  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Wood_Harvested = (Player 1 (Red) Lumber Harvested)
      • -------- Update... --------
I hope it helps and have a nice day.
 
Level 11
Joined
Nov 1, 2008
Messages
828
Harvest abilities does not behave as normal abilities, just like reincarnation it can't be detected. The best is to do:

  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Wood_Harvested = (Player 1 (Red) Lumber Harvested)
      • -------- Update... --------
I hope it helps and have a nice day.

Thankyou, but how will i know if its havesting, and say there are 30 workers havesting at differnet intervals? Or better yet, is there a system where i can count the wood a different way using *Player wood is equal to blah blah*.
And thankyou.
 
Level 11
Joined
Nov 1, 2008
Messages
828
Ahh i have found a way! This trigger will find out if a havester is havesting or not! Thanks to all who has helped me.

  • AntiStuck
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Arena1 Bounderys <gen> owned by Player 12 (Brown)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(havest))
            • Then - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top