Movement delay

How, what and why to code in BYOND.
Post Reply
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Movement delay

Post by CPTANT » #370512

So I was trying to reduce the impact stamina damage has on movement speed, but I found some weird behaviour in the way movement delay works.


It seems like the minimum movement delay increase at 40 already feels like a very large slowdown. It also seems to me like there should be a difference between running around with 41 health and 51 health, but somehow I don't notice this at all when testing.

Code: Select all

if(health_deficiency + H.staminaloss >= 40)
			if(flight)
				. += (health_deficiency / 75)
			else
				. += (health_deficiency / 25)
Does this code round or cut off the value? Why am I not seeing the difference when testing? Above 75 I get the extra slowdown I would expect.

This is what I would expect:
0-39 health -> no slowdown
40-49 health -> +1 move delay
50-74 health -> +2 move delay
75->99 health -> +3 move delay

Can someone help me make sense of this?
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
kevinz000
Joined: Fri Nov 14, 2014 8:41 am
Byond Username: Kevinz000
Github Username: kevinz000
Location: Dorm Room 3

Re: Movement delay

Post by kevinz000 » #370583

the correct answer is wait for me to finish
Post Reply

Who is online

Users browsing this forum: No registered users