Jump to content
Sign in to follow this  
commanderx

Destroy a via script created demolition charge?

Recommended Posts

Hi,

 

can anyone tell me how to destroy a Demolition Charge which I created via a script?

 

With an editor created DC and a variable name "boom" I can do

boom setDamage 1;

 

and the DC explodes.

 

It doesnt work with a script created DC

_boom = "DemoCharge_F" createVehicle position player;

_boom setDamage 1;

 

nothing happens. If I change the variables to global variablenames so boom instead of _boom still nothing happens. Any idea??

 

 

 

 

 

Share this post


Link to post
Share on other sites

i would try something like this:

_boom = objNull;
_boom = "DemoCharge_F" createVehicle position player;
waitUntil(sleep 0.1; !(isNull _boom)};
_boom setDamage 1;
maybe boom is not created fast enough but idk. just a suggestion.

Share this post


Link to post
Share on other sites

Try using "ModuleExplosive_DemoCharge_F" instead of "DemoCharge_F".

Share this post


Link to post
Share on other sites

use createMine instead createVehicle.

_boom = createMine ["DemoCharge_F", position player, [], 0];

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  

×