Modme Forums

Fall Damage

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: easyskanka
Probably really easy, but is there an easy way to turn off player fall damage within the script?


ModmeBot:

Reply By: CT8918

easyskanka
Probably really easy, but is there an easy way to turn off player fall damage within the script?

This may be unconventional but one way is to use an override function within zm_perks to do it.

You may do this by:

1. Open your map's gsc file. Go to:
C:\Program Files (x86)\Steam\steamapps\common\Call of Duty Black Ops III\usermaps\your_map\scripts\zm\your_map.gsc

2. Add this #using at the top of your maps gsc.

#using scripts\zm\_zm_perks;

3. Add this under the manage zones thread:
zm_perks::register_perk_damage_override_func(&damage_override);


4. Add this function to override any damage you want:
function damage_override(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
	switch(sMeansOfDeath)
	{
		case "MOD_FALLING":
		//case "MOD_BURNED":
		//case "MOD_GRENADE":
		//case "MOD_GRENADE_SPLASH":
		//case "MOD_EXPLOSIVE":
		//case "MOD_EXPLOSIVE_SPLASH":
		//case "MOD_ELECTOCUTED":
		//case "MOD_IMPACT":
			iDamage = 0;
			return 0;

		default:
			break;
	}

	return undefined;
}


This is what Wardog did to get PHD Flopper to work and it should work like this too. You can remove the // if you want the other cases to also be included. You can add other things as well if you know what their label is. I tested it and it works so I guess that's all that matters. I am sure there are easier ways to do this but this is the solution I know of without looking to far into it.


ModmeBot:

Reply By: easyskanka
thank youu!, working perfectly :)