detect unit order "follow"

Sartan

New Member
Reaction score
23
how do you detect if a unit is "following" another unit? in other words, if he is patrol after a unit with right mouse click? tried if current order = smart, did not work
if current order = patrol, did not work

so how do i detect the smart right mouse click order if you click on an allied unit to follow him?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I'd believe that the order is "smart"...

Did this small test, on a unit following another one and it displayed "smart"...
Trigger:
  • Untitled Trigger 005
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Current order of Paladin 0003 <gen>)))
 

Sartan

New Member
Reaction score
23
tried with smart, it doesnt detect if a unit is following another even though the unit order is smart.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Oh, you mean you want to tell the difference between regulat smar,t and "follow-smart" ? :eek:
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
He needs to know what order that is. You said smart but smart is used for many orders. Im not sure if you can detect this.
 

Rushhour

New Member
Reaction score
46
What events do you have? You will need to use " A unit is ordered targeting an object"
And like he said, the order string will be either "smart" (which works for every right click) or "patrol" I guess.
 

Bogrim

y hello thar
Reaction score
154
You can detect if smart is set to follow by filtering out the other orders through conditions. You can only follow friendly units with smart, remember?
 

Sartan

New Member
Reaction score
23
i'm using all the issued an order events...

why would i need to filter the other out?
if he targets someone and following him, then it should run, if he do another smart command, as just right click, it should run, my problem is... it doesn't even run.
 

Wratox1

Member
Reaction score
22
are you sure? add a debug message, make the game print out "runs" or something and see if the message is displayed..
 

Sartan

New Member
Reaction score
23
it isnt, do you realy think i hadn't tried that?
anyway no it doesn't run, it may jsut be MY map but i can detect all other order and types of smart EXEPT "follow"
 

Sartan

New Member
Reaction score
23
Code:
Move2
    Events
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order with no target
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Issued order) Equal to (Order(move))
                (Issued order) Equal to (Order(smart))
                (Issued order) Equal to (Order(patrol))
    Actions
        Unit - Pause (Triggering unit)
        Unit - Unpause (Triggering unit)
        Unit - Order (Triggering unit) to Stop

this trigger will only be activated a short while from another trigger, but that has nothing to do with my question so i will only post this one since its the only trigger relited to my topic
 

Seprest

New Member
Reaction score
15
The above posts are correct, just like right clicking something is smart, right clicking any object is also smart because there is a cirtain "AI" to moving, ect hehe. Make sure your trigger is checking for right clicking a unit, not a point, since the unit may move, moving to a unit is not dealing with locations directly, but is set to a function that changes based on the current location of the unit.

A few and far between bumps, but lol, I don't see how we can give you a different answer. Right clicking a friendly unit (following them) is smart, you arn't patrolling, you arn't attacking, you're not doing a normal move command. Moveover, I replicated the trigger of the post above, but for whenever my unit moved, and right clicking a friendly unit yielded a "smart" response in-game...
 

Sartan

New Member
Reaction score
23
The above posts are correct, just like right clicking something is smart, right clicking any object is also smart because there is a cirtain "AI" to moving, ect hehe. Make sure your trigger is checking for right clicking a unit, not a point, since the unit may move, moving to a unit is not dealing with locations directly, but is set to a function that changes based on the current location of the unit.

A few and far between bumps, but lol, I don't see how we can give you a different answer. Right clicking a friendly unit (following them) is smart, you arn't patrolling, you arn't attacking, you're not doing a normal move command. Moveover, I replicated the trigger of the post above, but for whenever my unit moved, and right clicking a friendly unit yielded a "smart" response in-game...

well i tried to recreate the trigger outside my map and it works fine of some reason, guess i have some other trigger that messes it up, case soloved
 
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