ID:168320
 
For my Naruto game,I want my character to be able to attack the tree from any direction,instead,it only attacks from the left.Heres the code(My coder for my game gave it to me)What do I have to do so I can attack the tree from any direction?

obj
PunchingTree
icon = 'turfs.dmi'
icon_state = "punchtree"
density = 1
verb
Attack()
set name = "Punch Tree"
set category = "Taijutsu"
set src in oview(1)
if(usr.flight == 1)
usr << "Not while walking on water."
return
if (usr.meditate==1)
usr<<"Not while meditating"
return
if(usr.dir == 4)
flick("punch", usr)
view()<<sound('punch.wav')
usr.move = 1
usr.icon_state = ""
usr.exp += 1/2
usr.meditate = 0
usr.levelcheck()
else
usr << "You must face the tree."
You have it so is your direction is EAST, or 4, that he attacks. Instead, check to see if the tree is in get_step from your direction.

[Edit] Fine, gosh!
obj/PunchingTree
icon = 'turfs.dmi'
icon_state = "punchtree"
density = 1
verb/Attack()
set name = "Punch Tree"
set category = "Taijutsu"
set src in oview(1)
if(usr.flight)
usr << "Not while walking on water."
return
if(usr.meditate)
usr<<"Not while meditating"
return
if(!(src in get_step(usr,usr.dir)))
usr<<"You must face the tree."
return
flick("punch", usr)
view()<<sound('punch.wav')
usr.move = 1
usr.icon_state = ""
usr.exp += 1/2 //plus 1/2? Isn't that 0.5? GASP
usr.meditate = 0
usr.levelcheck()
In response to CaptFalcon33035
can u edit my coding with the thing you put it so i'll know exactly wat u meen lol.
In response to CaptFalcon33035
lol thx,yipee,now i dont have to freakin think anymore
In response to Inuyashasha
Oh god, did you suddenly forget to breathe?

Well, you're not thinking, so you can't answer that with something like 'Breathing is an automatic thing' or something of the sort.

Of coarse, it is a very bad thing to stop thinking. Never do so. 'Evar'.
In response to CaptFalcon33035
Did you just use zeta code for a Naruto game...
In response to Mysame
LOL, that's what I was thinking!