Modme Forums

Mud Help

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


Thread By: John31
Can Some Help With Adding Origins mud Like To My map So when u walk on a brush it slows you down


Reply By: Abnormal202
Try this function I just made. Stick this in bottom of your GSC:

function mud()
	level.move_rate = 0.8; //rate a which player in mud moves. 1 is default speed.
	trigs = GetEntArray("mud_trig","targetname");
	for(i=0;i<trigs.size;i++) {="" trigs[i]="" thread="" slow_player();="" }="" }="" function="" slow_player()="" {="" foreach(player="" in="" level.players)="" {="" while(1)="" {="" if(="" player="" istouching(self))="" {="" player="" asmsetanimationrate(level.move_rate);="" player="" setmovespeedscale(level.move_rate);="" player.slowed="true;" }="" else="" if(="" (player="" istouching(self))="=" false="" &&="" player.slowed="=" true)="" {="" player="" asmsetanimationrate(1);="" player="" setmovespeedscale(1);="" player.slowed="false;" }="" wait(0.05);="" }="" }=""></trigs.size;i++)>
and this in your main function:
thread mud();
then in radiant place a trigger_multiple with the targetname: mud_trig everywhere you want the player to get slowed by Mud.
I haven't tested this yet, so tell me if it works.