OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Specnaz on 07 Sep 2002, 23:20:34

Title: Setpos how it works
Post by: Specnaz on 07 Sep 2002, 23:20:34
can anybody please explain me in short how does setpos with dese coords work? I read 3 tuts but I don'z get these numbers, what dose mean 3000Y, 1500X , I mean where are these positions "3000 , 1500"?what does these numbers mean?
Title: Re:Setpos how it works
Post by: T.S.C.Plage on 07 Sep 2002, 23:46:26
The 3000 is the mark of the X axis on an OFP map and the 1500 is the mark on the Y axis of a map. Z is for the height.

For example:
unitname setpos [ 3000 , 1500 , 50 ]

..."beams" a existing unit/object to the position 3000/1500 in a height of 50 meters.

You can get the coordinates by opening the mission.sqm and search for the players coordinates for example.

You can also use:
unitname1 getpos setpos unitname2

...this "beams" a unit/object to the position of an other unti/object. Mostly this is used together with the "invisible H" (setpos unit to position of invisibel H).

Setpos ist also used to simply change the height of an unit/object.

Initline:
this setpos [(getpos this select 0, getpos this select 1),1]

Now the unit/object is created in a height of 1 meter.

Greetz
Plage
Title: Re:Setpos how it works
Post by: Specnaz on 08 Sep 2002, 23:23:43
Thank you, whole next week I'll test that
greetz!