Jump to content

Recommended Posts

I would like to know how to script the functionality of a vehicle being paradropped from a plane for my Russian Airborne/VDV unit. Please state the specific steps required to complete these actions, because I'm new to scripting, and as much as I would like to learn how to do it, I simply don't have that much time to dedicate.

Share this post


Link to post
Share on other sites
On 6/7/2017 at 6:26 AM, crewt said:

I attempted doing this. Added:

_tank = "rhs_bmd2" createVehicle [4863.116,9891.143,150]; 
_tank setDir random 360; 
_tank setPos [4863.116,9891.143,150]; 
_tank call KK_fnc_paraDrop;

It spawned a vehicle on the ground instead of 150 meters above the ground with parachutes attached. Is this because I needed to spawn the tank that was specified in the post (perhaps that's why they specify "tank" and not "LAV/APC/IFV"?

Share this post


Link to post
Share on other sites
2 hours ago, Commander Salamander said:

I attempted doing this. Added:


_tank = "rhs_bmd2" createVehicle [4863.116,9891.143,150]; 
_tank setDir random 360; 
_tank setPos [4863.116,9891.143,150]; 
_tank call KK_fnc_paraDrop;

It spawned a vehicle on the ground instead of 150 meters above the ground with parachutes attached. Is this because I needed to spawn the tank that was specified in the post (perhaps that's why they specify "tank" and not "LAV/APC/IFV"?

 

What tank? Do you mean the return of createVehicle "_tank"?

That could be "_bananas" or whatever, it's just a handle that carries the return of the command createVehicle, in this case the created object of "rhs_bmd2".

 

For the altitude to be a guaranteed 150m above terrain level you'd need to use setPosATL.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, Grumpy Old Man said:

 

What tank? Do you mean the return of createVehicle "_tank"?

That could be "_bananas" or whatever, it's just a handle that carries the return of the command createVehicle, in this case the created object of "rhs_bmd2".

 

For the altitude to be a guaranteed 150m above terrain level you'd need to use setPosATL.

 

Cheers

I removed the top line of script which is:

_tank = "rhs_bmd2" createVehicle [4863.116,9891.143,150]; 

I changed this:

_tank setPos [4863.116,9891.143,150]; 

To this:

_tank setPosATL; 

The tank spawned 150 meters in the air and plummeted to the ground without any damage, although there weren't any parachutes. I suspect that the cause of this failure may be that there isn't any reference saved in my registry of animations/functions/calls for this:

_tank call KK_fnc_paraDrop;

Do I need to download and install the KK (Kill-zone-Kids) functions file if there is one?

Share this post


Link to post
Share on other sites
2 hours ago, Commander Salamander said:

The tank spawned 150 meters in the air and plummeted to the ground without any damage, although there weren't any parachutes. I suspect that the cause of this failure may be that there isn't any reference saved in my registry of animations/functions/calls for this:


_tank call KK_fnc_paraDrop;

Do I need to download and install the KK (Kill-zone-Kids) functions file if there is one?

most likely you will need the files that contain that function as it is not in base game.
 

Another method of doing this is to use create vehicle to create an airdrop parachute and then attach the tank to the parachute. I created a script that drops an equipment case in this manner when an aircraft i created reaches a certain waypoint.

 

this is a simple example of how to create a tank and attach it to a parachute so it actually airdrops in.

_chute = createvehicle ["i_parachute_02_f", [3723,4156,150],[],0,"can_collide"];
_tank = createVehicle ["rhs_bmd2", [4863.116,9891.143,150],[],0,"can_collide"]; 
_tank attachto [_chute,[0,0,2]];

one thing to be aware of when using this method is that the airdrop will continue to fall until the chutes 0,0,0 point reaches ground level causing the item attached to it to sink through the terrain until the chutes 0,0,0 point reaches the ground and is deleted. Once the chute deleted items that have sunk through the terrain will spring back up to ground level. If the item is too far below terrain level it will spring back up with incredible force. This is why the tank is attached at 0,0,2 and not 0,0,0. I have tested this code and it does work although you may want to play with the point at which the tank is attached to the chute to get it to be exactly where you want it.

 

With this method you cannot set the tanks direction however a solution to this would be to

spawn the tank somewhere in the world

set the tanks direction

spawn the chute where you want it

setposatl the tank to the chutes location

attach the tank to the chute

???????

profit

 

If you would like copies of the scripts I wrote for the full airdrop sequence I created PM me.

 

Hope this helps

  • Like 3

Share this post


Link to post
Share on other sites

I'm using the support module with a little code I wrote to drop a vehicle instead of a crate.

Share this post


Link to post
Share on other sites

I don't like using the support module for certain situations because it is dependent on you placing a vehicle in the world from the start and if that vehicle happens to be destroyed you can no longer call for support unless they have changed it recently. But that is also a valid method of doing the same thing

Share this post


Link to post
Share on other sites
2 hours ago, Squirtman said:

I don't like using the support module for certain situations because it is dependent on you placing a vehicle in the world from the start and if that vehicle happens to be destroyed you can no longer call for support unless they have changed it recently. But that is also a valid method of doing the same thing

You can use virtual support. That's OK for this purpose.

Share this post


Link to post
Share on other sites
14 minutes ago, pierremgi said:

You can use virtual support

???

please explain

Share this post


Link to post
Share on other sites

Just add a virtual provider support module (supply drop virtual) on map, synced to the module requester as other provider modules. (and module requested synced to players as usual).

In the supply drop virtual provider module, choose your parameter, Add some vehicles types (helicopters classes , even slow planes like V44 blackFish)

Dropping vehicle, the detailed process is here.

 

 

Share this post


Link to post
Share on other sites
On 6/9/2017 at 10:58 AM, Commander Salamander said:

I attempted doing this. Added:


_tank = "rhs_bmd2" createVehicle [4863.116,9891.143,150]; 
_tank setDir random 360; 
_tank setPos [4863.116,9891.143,150]; 
_tank call KK_fnc_paraDrop;

It spawned a vehicle on the ground instead of 150 meters above the ground with parachutes attached. Is this because I needed to spawn the tank that was specified in the post (perhaps that's why they specify "tank" and not "LAV/APC/IFV"?

I used same code,but there is no parachutes.When I changed "rhs_bmd2" to any Arma3 vanilla vheicle className,the script works perfectly,what should I do?

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

×