OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 01 Jun 2005, 09:55:52

Title: get pos of waypoint
Post by: 456820 on 01 Jun 2005, 09:55:52
im making a script wich should stop mt units fleing but i ran into a problem how do i get the squad to move to the next wayppoint with a script would it be this
leader player move getpos ########
where as the ## are the numbers of the waypoint but how would i find the correct numbers of the waypoint ?
Title: Re:get pos of waypoint
Post by: macguba on 01 Jun 2005, 10:06:24
Something like

leader grp1 allowFleeing 0;  leader grp1 doFollow leader grp1

should make him go to his next waypoint.   getWPPos will work if you know what the next waypoint is.     IIRC correctly there is no direct way of telling which waypoint is "active", although if its really important you could do it with variables.
Title: Re:get pos of waypoint
Post by: 456820 on 01 Jun 2005, 10:08:17
i was planning on using
? unitready leader player ; goto "exit"
do follow ? never thought of that.
ill have a go with it
Title: Re:get pos of waypoint
Post by: 456820 on 01 Jun 2005, 10:21:10
thanks alot it seems to be working fine.
solved.