Jump to content

Recommended Posts

can anyone (ideally someone from BIS?) explain how the throw distance is managed in the engine / addons?

 

we have about 15 grenade types in unsung mod with some pretty large blast radii, that worked great in arma 2, but with arma 3 the throw distance is about 25m, whereas in arma 2 you could chuck a grenade up to 50m, which is more realistic.

 

1. we currently face 2 choices - reduce our blast radius (and make the grenades unrealistic) or

2. increase the throw distance (and make the throw distance realistic)

 

we would prefer to increase the throw distance in our weapon "throw" or in the mass of the grenade etc, but i have no idea where to start, despite looking through all of the base classes.

 

Is the max throw distance of 15-30m hard-coded?

Share this post


Link to post
Share on other sites

It can't be hard-coded because you can throw the mini grenades for about 100m.

 

My guess is that the distance is determined by the initspeed value in the weapon config.

 

 

Share this post


Link to post
Share on other sites

It can't be hard-coded because you can throw the mini grenades for about 100m.

 

My guess is that the distance is determined by the initspeed value in the weapon config.

 

Yup, it's the initspeed in the grenade magazine class

 

class MiniGrenade (RGN) has initSpeed = 26; and class HandGrenade (RGO) has initSpeed = 18;

 

Grenades aren't really any different to bullets and cannon shells in terms of simulation - they have a speed and airfriction that affects their ballistic arc.

  • Like 1

Share this post


Link to post
Share on other sites

SWEET thanks guys - that's so awesome!

 

in ammo

typicalspeed = 14; //chemlight
typicalspeed = 18; //frag / ir strobe

typicalspeed = 22; //smoke
typicalspeed =26; //minifrag
typicalspeed = 185;//UGL grenade

that does nothing to throw distance!

 

in magazine though

initSpeed = 18;

testing...
 

damn, now somehow the grenades, all having different init speed magazines, will not load up in the muzzle throw, they show up as a separate weapon like mg or pistol. wtf lol.  i didn't change the weapon or muzzle entries.  it seems that editing the init speeds differently may have caused this to happen - not sure - zero errors coming up

Share this post


Link to post
Share on other sites

initspeed in the magazine class is the one you want

 

typicalspeed in ammo is a value that controls hit/damage reduction when the ammo's speed drops from initspeed at the muzzle to below the typicalspeed value (it's there to simulate loss of kinetic energy in imparting damage on the target). It's not really relevant to grenades since they do all their damage by explosion, but it's there because like I said; they're basically configured the same as bullets and shells

Share this post


Link to post
Share on other sites

damn, now somehow the grenades, all having different init speed magazines, will not load up in the muzzle throw, they show up as a separate weapon like mg or pistol. wtf lol.  i didn't change the weapon or muzzle entries.  it seems that editing the init speeds differently may have caused this to happen - not sure - zero errors coming up

Oh -- when you figure out how you did that I'd like to know, as I've modified a grenade for something else and would prefer it to show as a separate weapon.

Share this post


Link to post
Share on other sites

you can just clone throwmuzzle and add it as a magazine of the cloned muzzle maybe?

Share this post


Link to post
Share on other sites

ok so having a range of different initspeeds in the magazines totally borked the muzzle throw, so i set them all to inherit from our uns_grenade_base class, and set the initspeed to 28 in there. and they work perfectly.

 

thanks guys for your kind help!

Share this post


Link to post
Share on other sites

28 was 100m throw, so we've turned it down to 23. it now works just like arma 2

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

×