ID:141944
 
Code:
attack()
set src in view(usr.range)


Problem description:
well, I normaly code the attack so you can only do so when you're one square from the mob. However, I want to be able to attack the mob from a distance if I have certain weapons equiped. I thought putting a varible in there would do the trick but it dosen't like it.

It says "view arguments not allowed or invalid"
This is an attack so why would you set src in view? I think your confused? :S
mob
verb
attack()
for(var/turf/A in range(src,1))
new/obj/Test(A)
In response to Kurma
I've been codeing for under a week so I probably am :D
In response to Matthewsaaan
Attack(mob/M in get_step(usr,usr.dir))
//attack stuff here
</dm
That will do the trick for normal attacking. I've never done ranged attacks like what you described before other than as a separate verb.