How to make unit stay in place?

Status
Not open for further replies.
Level 7
Joined
Jul 29, 2009
Messages
276
i want a trriger that will make a unit imovable. that even if you tell it to move it just wont.
i treid "set movment speed" to 0 and even below and it isnt working (it's even moving pretty fast..)

thx for the helpers!
 
Level 6
Joined
Apr 23, 2008
Messages
263
  • 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
    • (Triggering unit) Equal to (your unit)
  • Actions
    • Set Point_Temp_1 = (Position of (Triggering unit))
    • Unit - Order (Triggering unit) to Move To (Point_Temp_1)
    • Custom script: call RemoveLocation(udg_Point_Temp_1)
 
Level 7
Joined
Jul 29, 2009
Messages
276
there is a problam of an endless loop in this func.
when you order the unit to move back to the point the trigger is called agein cuz its issuing a move. so you need to turn off the trigger before that action and than rurn it on agein.
also im not sure but i think you need to refer to the unit as "Orderd unit".
beside of that it's working great! thx! Rep+
 
Level 6
Joined
Apr 23, 2008
Messages
263
yeah forgot that. its just like you said, turn off the trigger then turn it on again, and im almost certain the triggering unit is the ordered unit. glad i could help!
 
Level 15
Joined
Aug 14, 2007
Messages
936
I have a solution, just

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

(Triggering unit) Equal to (your unit)

Actions

Set Point_Temp_1 = (Position of (Triggering unit))
Unit - Move Triggering Unit to Point_Tem_1
Custom script: call RemoveLocation(udg_Point_Temp_1)
 
Status
Not open for further replies.
Top