obj
speed
verb
Punch()
set category = "Training"
set src in oview(1)
if (usr.resting)
usr<<"Not while resting"
return
if (usr.meditate)
usr.random=0
usr<<"Not while meditating"
return
if (usr.resting)
usr.random=0
usr<<"Not while resting"
return
if(usr.stamina >= 5)
if(usr.dir == 4)
flick("speed hit",src)
usr.random = rand(1,12)
usr.icon_state="punch"
if(usr.random == 6)
usr.move = 1
usr.stamina-= rand(5,10)
usr.icon_state = "punch"
usr.speed += rand(0.80,0.85)
if(usr.random == 11)
usr.move = 1
usr.stamina-= rand(5,10)
usr.icon_state="punch"
usr.speed += rand(0.85,0.90)
else
usr.speed += 0
else
usr << "Please Face the bag.."
else
usr << "Out of Stamina"
The problem is, my code works to how I want it, the speed back action and animation works, but my character does not punch, he just stands still why the speed bag moves like how it's meant too.
How comes my usr.icon_state="punch" is not making my character punch his arm out??
Thank you..
flick("punch",usr)