manthila

Discourage grenade spam in small maps.

Recommended Posts

Hello, 

We all know we hate grenade spam in small maps like Killhouse and Shipment. So I have come up with a simple solution to tackle this issue. 

Simply add the below code in your globalogic file ("maps/mp/gametypes/_globallogic.gsc") inside the "Callback_PlayerDamage" function.

if(isDefined(sWeapon)) {
		if(sWeapon == "frag_grenade_mp")
			//Reduce the damage from the frag grenade if its a small map to discourage grenade spaming.
			if(level.script == "mp_killhouse" || level.script == "mp_shipment")
				iDamage = int(iDamage/4);
}

Happy Coding! 😃

Share this post


Link to post
Share on other sites

why not removing the grenades from the player loadout straight after spawn?

Share this post


Link to post
Share on other sites

Some players like grenades you know. Also, it does not totally prevent them from showing off their grenade skills if the victim got tagged earlier they got no chance of running away with a good grenade. So in my opinion it's a win-win. 😀

Share this post


Link to post
Share on other sites
On 4/14/2021 at 1:38 AM, manthila said:

Hello, 

We all know we hate grenade spam in small maps like Killhouse and Shipment. So I have come up with a simple solution to tackle this issue. 

Simply add the below code in your globalogic file ("maps/mp/gametypes/_globallogic.gsc") inside the "Callback_PlayerDamage" function.


if(isDefined(sWeapon)) {
		if(sWeapon == "frag_grenade_mp")
			//Reduce the damage from the frag grenade if its a small map to discourage grenade spaming.
			if(level.script == "mp_killhouse" || level.script == "mp_shipment")
				iDamage = int(iDamage/4);
}

Happy Coding! 😃

main()
{
	maps\mp\_load::main();
	maps\mp\_compass::setupMiniMap("compass_map_mp_killhouse");
	game["allies"]="sas";
	game["axis"]="russian";
	game["attackers"]="allies";
	game["defenders"]="axis";
	game["allies_soldiertype"]="woodland";
	game["axis_soldiertype"]="woodland";
	level.sunlight=1.5;
	>>>>setDvar( "weap_allow_frag_grenade", 0 );
}

No, didn't hear it?

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.