May 23 2011, 2:01 am (Edited on May 23 2011, 2:36 am) Hmm i couldn't really think of anything fancy for changing the speed of a player. but i did do a real basic form of movespeed altering. ```mob var move_speed = 5 //the default this gets changed as its the max. speed = 35 //the speed at which the player can move (the default is 30 so 3.5 pixels) at w.e rate the library does it proc get_speed() return max(0,(src.speed/10)) // move(d) if(trace) trace.event("[world.time]: move: d = [d]") var/limit_speed = 0 if(vel_x * vel_x + vel_y * vel_y <= move_speed * move_speed + 1) limit_speed = 1 move_speed = get_speed() if(d == EAST) if(vel_x < move_speed) vel_x += 1 else if(d == WEST) if(vel_x > -move_speed) vel_x -= 1 else if(d == NORTH) if(vel_y < move_speed) vel_y += 1 else if(d == SOUTH) if(vel_y > -move_speed) vel_y -= 1 if(limit_speed) var/len = sqrt(vel_x * vel_x + vel_y * vel_y) if(len > move_speed) vel_x = move_speed * vel_x / len vel_y = move_speed * vel_y / len ``` thats extremely basic and it hardly does much in the way of altering the rate of speed in which the character moves only allows for adapting to a faster speed which is pretty much a 3 vel_x increase at most without it being considered to fast Any pointers on what areas i may need to modify to allow for a better speed altering without screwing over the library but yea as i stated this is extremely basic and pretty much does nothing in the long run. The actual rate of moving pixels and stuff using the velocity would have to be changed i think for my plan to actually work. simply doing what i did wont do much expecially if i don't want to confine it to a non decimal number ~Midge
 May 23 2011, 4:46 am I'd probably create vars to store the player's base movement speed and to store anything that might modify the player's movement speed. Some of these modifiers don't need vars on the mob, we can look them up as we need to. Then, I'd just compute move_speed every tick: ```mob var base_speed = 5 movement() var/turf/t = loc if(t) move_speed = base_speed + t.slow ..()turf var slow = 0 mud slow = 2 ```