- Joined
- Oct 17, 2006
- Messages
- 151
The idea is that theres these harvesters and they are supposed to do an order when they arent moving. (its for an auto cast that automatically keeps them harvesting).
The trigger is supposed start with the event "every 1 second" however I changed as an experiment.
The problem is the condition. Apperantly there is no GUI condition thats like "unit isnt moving" or current NON PLAYER ISSUED order is stop.
Code is:
This is only activated when I myself order stop however when they finish moving and then are issued the stop command by the PC to stop moving it doesn't count that as a "current issued order". I've also tried using something like "current movement speed etc.." but that only relates to the movement speed that its set. Not the units current movement speed in game.
Also not that the message "Game - Display to (All players) the text: (Current order: + (String((Current order of (Picked unit)))))" show up as "Current order: " in game, meaning they are issued no order... its really annoying...
Any ideas?
The trigger is supposed start with the event "every 1 second" however I changed as an experiment.
The problem is the condition. Apperantly there is no GUI condition thats like "unit isnt moving" or current NON PLAYER ISSUED order is stop.
Code is:
-
Auto Collect
-
Events
- Unit - A unit Is issued an order with no target
- Conditions
-
Actions
-
Unit Group - Pick every unit in ETC_AutoCollectors and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Issued order) Equal to (Order(stop))
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of items carried by (Picked unit)) Not equal to (Size of inventory for (Picked unit))
-
Then - Actions
- Unit - Order (Picked unit) to Attack (Random unit from (Units within 2000.00 of (Position of (Picked unit)) matching (((Owner of (Matching unit)) Equal to Neutral Passive) and ((Unit-type of (Matching unit)) Not equal to Cliff Teleport))))
-
Else - Actions
- Unit - Order (Picked unit) to Move To (Center of Orc E Factory <gen>)
-
If - Conditions
- Game - Display to (All players) the text: ordered
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (All players) the text: order failed
- Game - Display to (All players) the text: (Current order: + (String((Current order of (Picked unit)))))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in ETC_AutoCollectors and do (Actions)
-
Events
-
If - Conditions
- (Issued order) Equal to (Order(stop))
- Then - Actions
This is only activated when I myself order stop however when they finish moving and then are issued the stop command by the PC to stop moving it doesn't count that as a "current issued order". I've also tried using something like "current movement speed etc.." but that only relates to the movement speed that its set. Not the units current movement speed in game.
Also not that the message "Game - Display to (All players) the text: (Current order: + (String((Current order of (Picked unit)))))" show up as "Current order: " in game, meaning they are issued no order... its really annoying...
Any ideas?