OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 05 May 2003, 02:23:53

Title: unit facing you
Post by: gadolinite on 05 May 2003, 02:23:53
How would you set up a situation where if the player enters a trigger area, a soldier would turn around and face you?  And when the player leaves, it will perform another action.

How would you get a telephone up on a table?
Title: Re:unit facing you
Post by: MadFred on 05 May 2003, 03:11:22
to make unit look at you:

put this in a trigger or waypoint or script or whatever:

unitname dowatch player    (or player unitname)

to get telephone up on a table:

put this in phone's init line:

phonename setpos [getpos this select 0, getpos this select 1,( getpos this select 2)+x]

where x is the height, so if you put in: ....select 2)+1.5] it would mean 1.5 mtr.

you will have to fiddle around with that height value to get it right.