origins mud removal
-
init() { level.a_e_slow_areas = 0; }
my first script ive ever made, i did this about a month ago with help (just compile the code above)
-
one line in init
-
hindercanrun i barely even know how to code lol
-
Angry Cat It would be more correct to do
level.a_e_slow_areas = [];
It just depends on whether foreach throws a script error if it tries to iterate over a non array.
Script errors can cause instability in some cases, it's wise to write code that doesn't cause them.
-
JezuzLizard ok thanks
-
Thanks for this! Useful for if I ever want to play Origins but just have a slightly easier less annoying time
-
Gabbyxo97 no problem
-
if you want to turn the mud back on you can also do
level.a_e_slow_areas = getentarray( "player_slow_area", "targetname" );
you can also target the mud and instead of disabling it you can increase or decrease the player movement speed in it. example
while( true ) { ary = level.a_e_slow_areas; num = getfirstarraykey( ary ); while( isdefined( num ) ) { area = ary[ num ]; if( self istouching( area ) ) { self setclientfieldtoplayer( "sndmudslow", 0 ); self notify( "mud_slowdown_cleared" ); continue; } else { num = getnextarraykey( ary, num ); } } self setmovespeedscale( <speed> ); wait .05; }
-
JuiceTrailer62 thinking about it that will probably crash, I don't know just made it up, but someone will get it and fix it probably