OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: edgren on 27 May 2008, 19:39:28

Title: How to raise an object in to the air?
Post by: edgren on 27 May 2008, 19:39:28
Hi everybody!

I just wonder how I can raise an object in to the air?

Thanks in advance!
Title: Re: How to raise an object in to the air?
Post by: Mandoble on 27 May 2008, 19:46:51
if the object is moveable, then using velocity command:
_object setVelocity [0,0,10];

if not, then using setPos command.
Title: Re: How to raise an object in to the air?
Post by: edgren on 27 May 2008, 20:11:17
Thanks, but I can only find setPosASL (http://www.ofpec.com/COMREF/index.php?action=list&game=ArmA&letter=s#737) :S How does the desc. of setPost look like?


#EDIT: Do not quote the entire previous post you're replying to.   h-
Title: Re: How to raise an object in to the air?
Post by: Mandoble on 27 May 2008, 20:28:54
setPos is the same but there is a difference between them, third element in the array of ASL is above sea level height, while setPos uses above ground level heights.

setPos command (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#313)

EDIT:
Your are linking to ArmA commands filter of the comref, which displays only new ArmA commands, setPos was present in OFP too.
Title: Re: How to raise an object in to the air?
Post by: edgren on 27 May 2008, 20:49:03
Thank you! But my Ammo SLA-object will not raise! Posting a image on how I have done.

(http://erik.edgren.nu/images/games/arma5.jpg)
Title: Re: How to raise an object in to the air?
Post by: Cheetah on 27 May 2008, 21:03:12
Quote
ammobox setPos [(getpos ammobox select 0),(getpos ammobox select 1),1];
Title: Re: How to raise an object in to the air?
Post by: edgren on 27 May 2008, 21:09:14
That did'nt work either :(
Title: Re: How to raise an object in to the air?
Post by: Mandoble on 27 May 2008, 21:19:41
Dont name your ammo box player, player is a reserved name for the player, dont use it for anything else.
Put this into your ammo box init field:
Code: [Select]
this setPos [getPos this select 0, getPos this select 1, 2]
Title: Re: How to raise an object in to the air?
Post by: Wolfrug on 27 May 2008, 21:42:42
And put it in the Initialization field, not the description field!

Wolfrug out
Title: Re: How to raise an object in to the air?
Post by: edgren on 29 May 2008, 01:16:38
Thanks :D