Home   Help Search Login Register  

Author Topic: How do I set the height I want a person/vehicle?  (Read 751 times)

0 Members and 2 Guests are viewing this topic.

Phantom

  • Guest
How do I set the height I want a person/vehicle?
« 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

Offline KTottE

  • Former Staff
  • ****
Re:How do I set the height I want a person/vehicle?
« Reply #1 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"

"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:How do I set the height I want a person/vehicle?
« Reply #2 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
Not all is lost.