Detecting Harvest.

TideOfChaos

New Member
Reaction score
25
I need a way to detect when I unit 'harvests' a destructible. It doesn't seem to work with any of the "Event - unit casts/channels/stops an ability".
 

AoK_

Member
Reaction score
1
did you try
periodic even and watch the *harvest*

if he suppose to have 100k and now 101k ?

is that what you mean?
 

TideOfChaos

New Member
Reaction score
25
Ok, well, when ever a units harvests a tree, run the Trigger.
So basically, I want it to give him an item and remove the lumber.
Each hit, adds one item.
I want it to run when he hits that tree.
 

millz-

New Member
Reaction score
25
Did you try:

Event
A unit is issued an order targeting an object
Conditions
(Destructible-type of (Target destructible of issued order)) Equal to Summer Tree Wall
Actions
blahblahblah


Something like this?
 

KillingSpree

New Member
Reaction score
7
That will trigger the event when you order the unit to harvest.
Not when it is harvesting. There is some time between you order the unit to harvest and the actual harvesting.
 

Samael88

Evil always finds a way
Reaction score
181
That will trigger the event when you order the unit to harvest.
Not when it is harvesting. There is some time between you order the unit to harvest and the actual harvesting.

Have you tried that theory? If you have not then I suggest you do.

The harvest ability is used upon attack. Why don't you just remove the damn ability all together and just detect the unit's attack.

Same events and conditions as above just add the "Unit-type equals to peasant" condition and your set. No need to remove the lumber either!
 

Azlier

Old World Ghost
Reaction score
461
>Have you tried that theory?

His theory is correct.

>just detect the unit's attack.

You can't detect a unit hitting a destructable. Not directly, anyway.
 

KillingSpree

New Member
Reaction score
7
Maybe this trigger will help:

Trigger:
  • test
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(harvest))
    • Actions
      • Game - Display to (All players) the text: Harvesting


I tested it, and it works. The only problem is that it triggers twice: when the unit targets a tree and when it returns the lumber to the townhall. And it triggers also on goldmines.
I'm digging into it to find a sollution :)
 

HydraRancher

Truth begins in lies
Reaction score
197
Maybe this trigger will help:

Trigger:
  • test
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(harvest))
    • Actions
      • Game - Display to (All players) the text: Harvesting


I tested it, and it works. The only problem is that it triggers twice: when the unit targets a tree and when it returns the lumber to the townhall. And it triggers also on goldmines.
I'm digging into it to find a sollution :)


No... It runs when you right click on a tree, this is ISSUED an order, not actually casting it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top