client
East()
if (mob.icon_state == "MAIN" || mob.icon_state == "BATTLE")
..()
West()
if (mob.icon_state == "MAIN" || mob.icon_state == "BATTLE")
..()
mob
key_down(k)
if (k == "east")
quickturneast()
else if (k == "west")
quickturnwest()
else if (k == "south")
crouch()
else if (k == "a")
actiona()
else if (k == "s")
actions()
else if (k == "d")
actiond()
else if (k == "/")
battle()
key_up(k)
if (k == "south")
stand()
key_repeat(k)
if (k == "east")
client.East()
else if (k == "west")
client.West()
mob
verb
crouch()
set hidden = 1
set instant = 1
if (icon_state == "BATTLE" || icon_state == "MAIN")
bound_height=90
icon_state="CROUCH"
stand()
set hidden = 1
set instant = 1
if (battle)
if (icon_state == "CROUCH")
bound_height=104
icon_state = "BATTLE"
else if (!battle)
if (icon_state == "CROUCH")
bound_height=104
icon_state = "MAIN"
quickturneast()
set hidden = 1
set instant = 1
if (icon_state == "MAIN" || icon_state == "BATTLE" || icon_state == "CROUCH")
if (dir == WEST)
dir = EAST
else if (dir == EAST)
client.East()
quickturnwest()
set hidden = 1
set instant = 1
if (icon_state == "MAIN" || icon_state == "BATTLE" || icon_state == "CROUCH")
if (dir == EAST)
dir = WEST
else if (dir == WEST)
client.West()
battle()
set hidden = 1
set instant = 1
if (battle)
if (icon_state != "BATTLE")
return
battle=0
icon_state = "MAIN"
else if (!battle)
if (icon_state != "MAIN")
return
battle=1
icon_state = "BATTLE"
actiona()
set hidden = 1
set instant = 1
if (icon_state == "BATTLE" && A == "Punch")
var/Attack/A
icon_state = "HIGH PUNCH"
if (dir == EAST)
A = new /Attack/PUNCH/HIGHPUNCH/EAST(src.loc)
else if (dir == WEST)
A = new /Attack/PUNCH/HIGHPUNCH/WEST(src.loc)
A.Attack(src)
sleep(2)
if (client && client.keys["south"] == 1)
bound_height=90
icon_state = "CROUCH"
else
icon_state = "BATTLE"
else if (icon_state == "CROUCH" && A == "Punch")
var/Attack/A
icon_state = "LOW PUNCH"
if (dir == EAST)
A = new /Attack/PUNCH/LOWPUNCH/EAST(src.loc)
else if (dir == WEST)
A = new /Attack/PUNCH/LOWPUNCH/WEST(src.loc)
A.Attack(src)
sleep(2)
if (client && client.keys["south"] == 1)
icon_state = "CROUCH"
else
bound_height=104
icon_state = "BATTLE"
actions()
set hidden = 1
set instant = 1
var/Attack/A
if (icon_state == "BATTLE" && S == "Kick")
icon_state = "HIGH KICK"
if (dir == EAST)
A = new /Attack/KICK/HIGHKICK/EAST(src.loc)
else if (dir == EAST)
A = new /Attack/KICK/HIGHKICK/WEST(src.loc)
A.Attack(src)
sleep(3)
if (client && client.keys["south"] == 1)
bound_height = 90
icon_state = "CROUCH"
else
icon_state = "BATTLE"
else if (icon_state == "CROUCH" && S == "Kick")
icon_state = "LOW KICK"
if (dir == EAST)
A = new /Attack/KICK/LOWKICK/EAST(src.loc)
else if (dir == WEST)
A = new /Attack/KICK/LOWKICK/WEST(src.loc)
A.Attack(src)
sleep(3)
if (client && client.keys["south"] == 1)
icon_state = "CROUCH"
else
bound_height = 104
icon_state = "BATTLE"
actiond()
set hidden = 1
set instant = 1
if (D == "Jump")
if (icon_state == "MAIN" || icon_state == "BATTLE")
if (!actions.Find("Jumping"))
actions.Add("Jumping")
if (dir == EAST)
icon_state = "JUMPEAST"
else if (dir == WEST)
icon_state = "JUMPWEST"
if (client && client.keys["east"] == 1)
var/a = 2
do
sleep(1)
step(src,NORTHEAST,16)
a--
while (a)
else if (client && client.keys["west"] == 1)
var/a = 2
do
sleep(1)
step(src,NORTHWEST,16)
a--
while (a)
else
var/a = 2
do
sleep(1)
step(src,NORTH,16)
a--
while (a)
actions.Remove("Jumping")
actions.Add("Falling")
NormalFall()
proc
NormalFall()
while (actions.Find("Falling"))
sleep(1)
if (client && client.keys["south"] == 1 && client.keys["east"] == 1)
if (!icon_state == "JUMP EAST")
icon_state = "JUMP EAST"
step(src,SOUTHEAST,16)
else if (client && client.keys["east"] == 1)
if (!icon_state == "JUMP EAST")
icon_state = "JUMP EAST"
step(src,SOUTHEAST,8)
else if (client && client.keys["south"] == 1 && client.keys["west"] == 1)
if (!icon_state == "JUMP WEST")
icon_state = "JUMP WEST"
step(src,SOUTHWEST,16)
else if (client && client.keys["west"] == 1)
if (!icon_state == "JUMP WEST")
icon_state = "JUMP WEST"
step(src,SOUTHWEST,8)
else if (client && client.keys["south"] == 1)
step(src,SOUTH,16)
else
step(src,SOUTH,8)
Attack
parent_type = /obj/
icon_state = ""
icon = 'MHuman.dmi'
density = 1
proc
Attack(mob/O)
..()
PUNCH
Attack(mob/O)
for (var/mob/A in obounds(src,0))
if (A != O)
O.Punch1(A)
break
del src
bound_height = 16
bound_width = 24
HIGHPUNCH
bound_y = 67
EAST
bound_x = 85
WEST
bound_x = 18
LOWPUNCH
bound_y = 53
EAST
bound_x = 85
WEST
bound_x = 18
Problem description:
(this is run with Forum_Accounts Keyboard library.)
When I run the following code the NormalFall proc sometimes gets stuck running. It should stop after the mob touches down on the ground. Any ideas where I went wrong?