ID:159054
 
is there a way to make an attack verb without the:

"Attack(mob/M as mob in oview(1))" (mob/M as mob in oview(1)).

What i want, is for ppl to be able to attack loose air if they
want to,(not that it does anything). so i guess i could have what is shown above, but how would i go about making it show the attack animation, even if there is no mob there.(attacking the "air" if u want to call it that )

i found a demo which im looking at, but i would like to hear som ideas.
mob/verb/Attack()
var/mob/M=locate(/mob) in oview(1)
if(M)
//attack code
else
//animation code
get_step()
You could use as null|mob instead of as mob to make the argument optional, allowing players to use it even if there's no mob next to them. Then you just need to check if M is valid or not (well, you generally always should anyway).
In response to Kaioken
thanks, this one sounds like what i was looking for.

also thanks to all the other replies.