Jump to content
Sign in to follow this  
roguetrooper

Spawn biggest vanilla explosion?

Recommended Posts

nevermind (btw, there should be a user-option to delete own uncommented threads)

Edited by roguetrooper

Share this post


Link to post
Share on other sites

This is working fine for me in debug with or without the setDamage line. 

_pos = screenToWorld [0.5, 0.5];
_b = createVehicle ["Bo_GBU12_LGB", _pos, [], 0, "CAN_COLLIDE"];

 

 

  • Like 1

Share this post


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

nevermind (btw, there should be a user-option to delete own uncommented threads)

 

No idea what the original post was, since it has been edited.

To get the explosion with the biggest radius you could go through all configs and check for indirectHitrange * 4, since up to 4x the given value objects within that radius will be damaged.

To get the maximum hit of an explosion is similar and rather straight forward.

 

_explosives = "getNumber (_x >> 'explosive') isEqualTo 1 AND getNumber (_x >> 'hit') > 0" configClasses (configfile >> "CfgAmmo") apply {configName _x};

_radiusSorted = _explosives apply {[4 * (getNumber (configfile >> "CfgAmmo" >> _x >> "indirectHitRange")),_x]};
_radiusSorted sort false;

_damageSorted = _explosives apply {[(getNumber (configfile >> "CfgAmmo" >> _x >> "hit")),_x]};
_damageSorted sort false;

systemchat str (_radiusSorted select 0);//returns [120,"R_230mm_fly"], where 120 is the maximum radius around impact that will damage entities
systemchat str (_damageSorted select 0);//returns [10000,"HelicopterExploBig"], where 10000 is the damage

To spawn it simply use @Harzachs approach, need to setDamage 1 to the ammo to actually make it explode.

 

Cheers

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  

×