ID:177863
 
I need my game to where when you press SOUTH it goes into a crouch state using this coding so far...

var/gravity = 2
var/fall_type = 1

client
Northwest()
return
Northeast()
return
Southwest()
return
Southeast()
return
North()
usr.jump()
East()
if(usr.lock == 1)
return
usr.lock = 1
if(usr.icon_state == "east")
step(usr,EAST)
if(usr.icon_state == "west")
usr.icon_state = "east"
sleep(1)
usr.lock = 0
return
West()
if(usr.lock == 1)
return
usr.lock = 1
if(usr.icon_state == "west")
step(usr,WEST)
if(usr.icon_state == "east")
usr.icon_state = "west"
sleep(1)
usr.lock = 0
return

Please tell me how might accomplish this.

Thanx in advance,
Punkrock546 #;}
South()
if(usr.lock == 1)
return
usr.lock = 1
flick("crouch",usr)
usr.icon_state = "roll"
sleep(1)
usr.lock = 0
return