Jump to content
chronicsilence

Dropping IR Grenades From Vehicles

Recommended Posts

Hey everyone,

Does anyone know of a good way to drop grenades from vehicles? I'm trying to drop IR strobe grenades from vehicles via script. I can't seem to find a way to spawn in an active grenade (as if it had been thrown).

Thanks!

Share this post


Link to post
Share on other sites

You only need this: https://community.bistudio.com/wiki/createVehicle

...and the correct classname, which you can either lookup, or get by using the following script:

player addEventHandler ["fired", "systemChat format['Classname: %1',typeOf (_this select 6)];"];

(use with debugconsole or put in the init of your player)

With that script running, you will see the classname of every projectile you fire (which includes thrown grenades).

Share this post


Link to post
Share on other sites

Interestingly, if I create a vehicle with the class name of the projectile ('B_IRStrobe', in this case) using

_veh = "B_IRStrobe" createVehicle position (vehicle player);

while hovering in the air, then it creates the IR grenade in the right location but it just hangs in the sky and doesn't fall to the ground. Any idea how to make it act like a real grenade that was thrown?

Share this post


Link to post
Share on other sites

I would use the createVehicle_array command in-place of your current usage, it's newer, and you can put "CAN_COLLIDE" as the last argument to see if that gives you "object freedom".

Share this post


Link to post
Share on other sites
I would use the createVehicle_array command in-place of your current usage, it's newer, and you can put "CAN_COLLIDE" as the last argument to see if that gives you "object freedom".

Unfortunately, none of the special properties (including "CAN_COLLIDE") allow the object to fall to the ground. Any other thoughts?

Share this post


Link to post
Share on other sites

I think I figured it out. This is only an issue with the IR grenade, I think because it creates a light strobe effect and ARMA really doesn't like having dynamically moving lights (see: issues with #lightpoints). I switched it out to a Stone grenade instead and it works perfectly.

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

×