Distance between units

RedOrb

You can change this now in User CP.
Reaction score
14
Hi all,

Have a problem here. I've got a periodic event every 2 seconds telling me the distance between my triggering unit and the target unit (of my right-click). The distance is always correct in this message. But this trigger won't fire! If I disable the 'distance between' condition, then it works, and the value the message shows is around 5000!

Anyone know what is going on? The unit is in shallow water, if that makes any difference, but! I moved it to land and it still did the same thing, so don't know..

Code:
WaterskiStartEnd
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(smart))
        (Target unit of issued order) Equal to Turtle 0092 <gen>
        (Distance between (Position of (Triggering unit)) and (Target point of issued order)) Less than or equal to 500.00
    Actions
        Game - Display to (All players) the text: (String((Distance between (Position of (Triggering unit)) and (Target point of issued order))))
 

tommerbob

Minecraft. :D
Reaction score
110
Unless I'm mistaken, there is no (Target point of issued order) in your event. You need to use:

Trigger:
  • (Distance between (Position of (Triggering unit)) and (Position of (Target unit of Issued Order)) Less than or equal to 500.00
 

RedOrb

You can change this now in User CP.
Reaction score
14
Thanks Tommer, my eyes are boggling due to massive amounts of time spent in GUI trigs :(
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
You also want to remove the leaks in that. (Position of (Triggering unit)) and (Position of (Target unit of Issued Order)) both leak a location.
 
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