Jump to content
Sign in to follow this  
1para{god-father}

How to lower an object to ground level

Recommended Posts

Hi Guys,

I have a script that I can load/unload ammo crates onto a Jackal, my problem is if the jackal is destroyed and the ammo crate is still inside it end up floating in the air where it was onboard the Jackal.

How can I get it to lower the ammo crate to ground level when the Jackal is destroyed ?

Cheers guys

Share this post


Link to post
Share on other sites

AmmoCrateName setPos [(getPos this select 0),(getPos this select 1),0"]

should put it on the ground

Share this post


Link to post
Share on other sites

if (!alive _jackal) then
{
_box setPos (_box getPos select 0, _box setPos select 1, 0);
};

Or even better if you set the box some meters away:

(_box getPos select 0) + 5, (_box setPos select 1)+5

It is a primitimite method not checking groundtype, directions, such, but you get the idea...

koni was faster, I leave the code though... :)

Share this post


Link to post
Share on other sites

Could just use a trigger with the condition that you require, and which ever setpos method you decide to use in the on activation box, or use the same condition but then execute zapat's script, which obviously would need to be sved as a script then called from the trigger.

Share this post


Link to post
Share on other sites

They say on the wiki that if it can be done in the editor, it is very often best to do so.

Edited by lozz08

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  

×