Problem action orders in triggers.

sherlia

New Member
Reaction score
0
All my local variables work as intended and have all the correct values (even tested without any variables).

All the unit orders are executed as they should be, it shows, it start moving. it stops, it unload, it goes back. I know this because i removed the wait command and the hide unit command.
When i add the Hide command at the end of the list then it show/hide the unit directly, ignoring all commands between and visual effect of it is like nothing happen.
When i add the wait command, then the wait command starts DIRECTLY when the unit is shown and not when the unit has unloaded as it should do. This means that wait timer finish before the unit has even started to unload.
If i add both the wait command and hide unit command then the hide command waits for the wait command to finish and THEN it hide the unit no mater what.

Both the wait command and Hide command ignores all the unit order commands :(

In short:
All unit action commands (orders) can see the "wait" action command and see each other.
The wait command don't see ANY other command and start like it was first command in line.

The main problem is the General - wait command and the unit show/hide command. Why does it not work as intended and execute in order?
 
Last edited by a moderator:

sherlia

New Member
Reaction score
0
What i want is basically.
1. A unit get moved instantly to point A.
2. The unit is shown.
3. The unit moves to point B.
4. The unit unload it's cargo (if it has any cargo).
5. Unit wait at point B for 10 game seconds.
6. Unit moves back to point A
7. Unit hide.
 

AgentPaper

From the depths, I come.
Reaction score
107
The issue order commands simply add the order to the unit, the trigger thread doesn't stop and wait for the order to be completed. What you need to do is add in a special wait command, that checks every second or so to see if the unit is idle, which means it's completed all of it's orders. Then, add another wait for 10 seconds, then issue the orders to move back to the original point, add another wait for until the unit is idle, then hide it.

Another thing that will cause problems, is that your "unload" order is being set to replace existing orders, which means it will replaces the move command you just gave it. Make that "after existing orders" so that it waits until it's finished moving to unload it's units.

Finally, you don't need to order the unit to stop, it'll do that automatically once it's orders are complete. You can order it to hold position if you're worried about something attacking it to keep it from running away, but otherwise you just need to command it to move, unload, then move again.
 

sherlia

New Member
Reaction score
0
Intresting what you say, if it works then i'm really happy :)

About the secound thing you said. The unload command is no big deal becouse of the stop command in front of it. I agree that the stop command is useless, i was mostly just testing to see what happend (forgot to clean up that before this image was taken.)

Gona test this and see what happens.
 
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