OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: DerGilb on 06 Jun 2004, 00:38:54

Title: waypoint and watching
Post by: DerGilb on 06 Jun 2004, 00:38:54
Hi

I'm trying to make a unit cross a street, watch left and right, walk on to the other side and turn around.

I'm trying and trying, buti it won't work :/

First I tried with waypoints in the editor, didnt work.
Then i made a little script and some markers, but it still doesnt work.

Code: [Select]
Horst move getpos horst_move1
Horst doWatch getMarkerPos "guck1"
~2
Horst doWatch getMarkerPos "guck2"
~2
Horst move getpos horst_move2
~1
Horst doWatch getMarkerPos "guck1"
exit

Units Name is Horst, guck1 & guck2 are the markers.
horst_move1 and 2 are markers used as waypoints.

He walks from a to b, and he looks always direction guck1, but he doesnt stop where i used ~1/~2.

Could you give me a hint, whats wrong?

(i'm just trying mission-editing for some days, and my english isnt good enough for some tutorials :/ )

thx
 Gilb
Title: Re:waypoint and watching
Post by: macguba on 06 Jun 2004, 01:18:10
A doWatch command is satisfied as soon as the object comes into the field of view.   In other words, your markers should not be along the street:  they should be almost behind him.