OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Serial Killer on 08 Mar 2005, 11:42:33

Title: Unit wont move. Why?
Post by: Serial Killer on 08 Mar 2005, 11:42:33
I've made this script..
Code: [Select]
_JC Move Position _Tent
When I try to activate it, that 'JC' named unit wont move to that Tent's position. I have tryed to remove those _ markers, but nothing happenes. Can anyone help me?
Title: Re:Unit wont move. Why?
Post by: bedges on 08 Mar 2005, 11:47:02
i believe the syntax is doMove...
Title: Re:Unit wont move. Why?
Post by: Serial Killer on 08 Mar 2005, 12:21:17
I'll try..
Title: Re:Unit wont move. Why?
Post by: THobson on 08 Mar 2005, 12:22:16
Either move or doMove should work.  It is the use of position that puzzles me.  I always use getPos and that works, but from the comref it looks like position should work also.  Maybe an OFP feature.  Try:


_JC Move getPos _Tent  
or
_JC doMove getPos _Tent  

Bye the way - I just noticed your reference to markers.

If _tent is a marker name then you should use

getMarkerPos


Title: Re:Unit wont move. Why?
Post by: Serial Killer on 08 Mar 2005, 12:30:39
Thanks, THobson! It's working now. Next question.. How can I set A.I.'s speed mode to slowest? I mean Limited.
Title: Re:Unit wont move. Why?
Post by: THobson on 08 Mar 2005, 12:33:29
group setSpeedMode mode

Operand types:
group: Object or Group
mode: String
Type of returned value:
Nothing
Description:
Set group speed mode. Mode may be one of: "LIMITED" (half speed),"NORMAL" (full speed, maintain formation),"FULL" (do not wait for any other units in formation).

Example:
groupOne setSpeedMode "LIMITED"

Title: Re:Unit wont move. Why?
Post by: Serial Killer on 08 Mar 2005, 12:54:39
Thank you! :)