ID:261697
 
Okay, when i use "Action1" and i'm shooting from a distance, it doesn't work. But when i'm one tile away from my opponent, it damages the opponent. I think that the get_step part of the coding is wrong. But i tried many others, like step, different kinds of get_step and more... Any help would be appreciated...

mob
Soldier
verb
Action1()
set category = "Battle"
if(src.Ammo <= 5)
src << "Not enough ammo to throw the Axe..."
else
view() << sound('AttackSword.wav')
src.Ammo -= 5
var/A = new /obj/battling/Axe (get_step(src,usr.dir))
walk(A,dir,0.1)
sleep(30)
walk(A,0)
del(A)
If anybody could tell me what to change the get_step thing into something better that effects all of the time, i would be thankful.</<>
Nobody is able to help me?
Unknown Person wrote:
var/A = new /obj/battling/Axe(get_step(src,usr.dir))

Why do you have src here? Src in this case would be the verb (I think). You don't need that there. I believe you need <nobr><code> var/A = new /obj/battling/Axe(get_step(usr,usr.dir)) <code></nobr> Let me know if that works. ~>Volte
In response to Volte
Uhh, no. I suggest you learn the difference between src and usr before making ANY, and I mean ANY suggestions about them. Both are perfectly valid in this situation.
In response to Garthor
I was thinking the verb was attached to an object. My mistake. In that case src would be the object. In any case, there's no specific reason why he should use src AND usr.

~>Volte