Jump to content
Sign in to follow this  
Casto

How can i get an object up in the sky ?

Recommended Posts

it was something like:

this getpos [(setpos 0),(setpos2) bla bla + 10]

could some one give my the corect sentence???

thanx,

Casto

Share this post


Link to post
Share on other sites

hi,

this setpos [(getpos this select 0),(getpos this select 1),7];

btw doesn't work with vehicles

greetz

thomas

Share this post


Link to post
Share on other sites

k but does it work on gamelogic's , caus i need it voor camera targeting.

Share this post


Link to post
Share on other sites

Hi,

do u want to put the camera in the sky or some object?

grettz

thomas

Share this post


Link to post
Share on other sites

the setpos command works for ANY vehicle...

and it works also for vehicles.

( a vehicle is a object like any other ).

send to the script the object to put at 10 meters above the ground.

the time before the next loop of ~0.01 seconds is necessary

( if less the vehicle will go up and down... ).

_object = _this select 0

_objpos = getpos _object

#loop

_object setpos [_objpos select 0,_objpos select 1,10]

~0.01

goto "loop"

exit

Share this post


Link to post
Share on other sites

my solution:

this setpos [(getpos this select 0),(getpos this select 1),7];

doesn't work with armored vehicles, it just works with empty objects like tents, flags....

greetz

thomas

Share this post


Link to post
Share on other sites

setpos works also for armored vehicles just tested it

the only difference between objects and vehicles like armored one (for example M1A1)

is that vehicles do follow the law of GRAVITY

so to put a M1A1 in the air you ll need to do a setpos loop as i wrote before.

Share this post


Link to post
Share on other sites

an empty unarmored vehicle do not follow the law of gravity until someone enters the vehicle, and the uses of this command is useful in building large buildings too

Share this post


Link to post
Share on other sites

yep and it also don t follow the law of gravity till someone shoot on it.

(if you shoot on a jeep set with setpos in the air, it will make it fall on the ground!! how strange).

Share this post


Link to post
Share on other sites

Good thing I stumbled upon this one; I want to place a building in the air, and I always use this init line:

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

<<100 being the height I want the building to be at. I know I'm doing something wrong - because the building is never up there! biggrin.gif So, exactly WHAT could I be doing wrong?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×