HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Order stoppage

06-06-2004, 07:14 AM#1
Panto
Greetings.

Is there something wrong with this trigger? I'm using it to stop the player from using any of the unit's abilities except for one (which, here, is represented by "wtf").
Code:
Order Stoppage
    Events
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order with no target
    Conditions
        ((Ordered unit) is A structure) Equal to False
        (Owner of (Ordered unit)) Equal to Neutral Hostile
        Or - Any (Conditions) are true
            Conditions
                (Issued order) Not equal to (Order(wtf))
                (Issued order) Not equal to (Order(stop))
    Actions
        Trigger - Turn off (This trigger)
        Unit - Pause (Ordered unit)
        Unit - Order (Ordered unit) to Stop
        Unit - Unpause (Ordered unit)
        Trigger - Turn on (This trigger)
The trigger seems to create quite a bit of lag when it's used; I'm not really sure why. Also, the unit does not have its "stop" icon highlighted after the trigger fires. Also, orders that target a point, like Attack, show a targeting reticle the first time, but never after.
It seems like maybe the unit is never being unpaused, perhaps, or not fast enough. I'm leery about removing the Pause bits, because I want to be quite sure that the unit won't, for example, move at all.

Any help is appreciated.

EDIT: Upon reflection, I may be making an infinite loop. It looks like I should be using "And - Multiple Conditions" instead of "Or"
06-06-2004, 12:54 PM#2
linkmaster23
You're telling the Footman to pause, thus getting rid of any posssible order commands. You have to unpause him before you can tell him to stop again.
06-06-2004, 01:03 PM#3
AIAndy
The problem is here:
Quote:
Or - Any (Conditions) are true
Conditions
(Issued order) Not equal to (Order(wtf))
(Issued order) Not equal to (Order(stop))
This needs to be and. As it is now, it is always true.
06-06-2004, 01:06 PM#4
linkmaster23
Ah, I didn't see that. Thanks. Yea... it's sposed to be AND - Any (Conditions) are true... :P
06-07-2004, 02:12 AM#5
Panto
Thanks for your help, fellows. I actually edited my post to say that I thought that was the problem, and then I went and followed up on it, and I came back to say that it works great and found these responses. :>

Nonetheless, thanks. I appreciate your willingness to lend a hand.