Sidescroller

by Forum_account
Sidescroller
This library gives you the basic movement system of a platformer. You can make an action/platform game in minutes!
ID:892073
 
When I run the Mario demo, jumping on the goombas is a seamless process, but when I replicate the same thing in my own game with an enemy AND an object it pauses for about a second before continuing with the process.

    bump(atom/a, d)
if(istype(a, /obj/spring) && d == DOWN)
if(a.icon_state=="down")
vel_y = 14
a.icon_state="up"
a.pheight=52
sleep(10)
a.pheight=32
a.icon_state="down"
return
if(istype(a, /mob/enemy/SimpleWalker) && d == DOWN)
vel_y = 6
a:die()
return

..()
sleep(10)

Yep, it pauses for a second. Seems legit.
In response to Bravo1
Bravo1 wrote:
sleep(10)

Yep, it pauses for a second. Seems legit.

Lol, no I already checked that. It pauses on the If line. and for both of them.

EDIT: Nevermind, that was completely the issue.. LOL