ID:147328
 
Problem: When my icon_state changes, my overlay doesn't!
Code:
client
East()
if(mob.icon_state=="L")
mob.icon_state="R"
else
if(usr.lock==0)
usr.lock=1
..()
sleep(usr.run)
usr.lock=0
West()
if(mob.icon_state=="R")
mob.icon_state="L"
else
if(usr.lock==0)
usr.lock=1
..()
sleep(usr.run)
usr.lock=0

Reward: Air Pudding
Why not just use directional icons?
In response to Hazman
silence, ficus.
It depends on how you add the overlays. If you specify an icon_state other than "" when you place it on the base, the overlay won't change to reflect the base's icon_state.