OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Phantom on 15 Jul 2003, 15:31:19

Title: How do I set the height I want a person/vehicle?
Post by: Phantom on 15 Jul 2003, 15:31:19
I need to put a whole bunch of vehicles and people on this wooden bridge, can someone please tell me how to set the height

Cheers
Phantom
Title: Re:How do I set the height I want a person/vehicle?
Post by: KTottE on 15 Jul 2003, 16:56:13
unitname setPos [getPos unitName select 0, getPos unitName select 1, (getPos unitName select 2) + #]

where # is the number of meters you want the unit to go up into the air.
My suggesting is write a script that looks like this:

Code: [Select]
_unit = _this select 0

_unit setPos [getPos _unit select 0, getPos _unit select 1, (getPos _unit select 2) + #]

Exec it with:

[this/unitname] exec "scriptname.sqs"

Title: Re:How do I set the height I want a person/vehicle?
Post by: Artak on 15 Jul 2003, 17:32:35
 :o

Maybe even

Code: [Select]
_unit = _this select 0
_height = _this select 1

_unit setPos [getPos _unit select 0, getPos _unit select 1, (getPos _unit select 2) + _height]

And exec with:

[this/unitname,height] exec "scriptname.sqs"

 :o