Detect harvesting workers

Bonzo

New Member
Reaction score
4
Hi,
I want wisps (or any other type of workers) to go lumber harvesting after they have finished a building.
Here's my trigger:
Buildings Finished

Events
Unit - A unit owned by Player 1 (Red) Finishes Construction
Conditions
Actions
Wait 0.01 seconds
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to Wisp)) and do (Actions)
Loop - Actions
Game - Display to (All players) the text: Wisp picked
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'- Conditions
(Current order of (Picked unit)) Ungleich (Order(gather))
'THEN'-Actions
Game - Display to (All players) the text: Wisp doesnt gather
{ Send wisp to harvest lumber }
'ELSE'-Actions
Game - Display to (All players) the text: Wisp gathers something

What is is supposed to do is picking every wisp nearby (the range isnt fitting yet) and check whether it is harvesting something ( -> do nothing) or it just stand near the finished building ( -> send it to harvest).

My problem is the 'Current Order' line. When I use gather, like above, it returns: 'Wisp picked - Wisp gathers something' everytime.
When I use 'harvest' as orderstring, how the oderstring of the ability is called, it always returns 'Wisp doesnt gather' everytime.

If I left out the condition everytime a building is finished all wisps nearby would stop harvesting and go to the nearest tree (which is the old one again). This causes heavy interruptions, because wisps need some time to gather +5 lumber. ( I hope it is clear what i mean)


Greets Bonzo
 

Doctor-Peppe

New Member
Reaction score
0
Gather is a wrong string, its just a name of the ability, not an order type. Try cast, cause when harvesting, all the unit does is to cast an ability
 

PooBucket

New Member
Reaction score
12
You could go building unit (I'm not sure if there's something like that in WE) to order Night Elf - Wisp Gather Lumber.
 

Bonzo

New Member
Reaction score
4
I found out what my mistake was... the order of the harvesting wisps is 'smart'. (dont ask me why)
But I simply can use the <empty string> as current order to detect the idle worker.

@PooBucket: Building unit refers to the building that is finished, not the worker who has finished it.

Thanks for the help

Greets Bonzo
 
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