Here's my code:
mob/pc
Click(mob/pc/M as mob)
if (M in oview(1))
Attack(src)
This makes it so that if you click on a /mob/pc who is 1 tile away from you, you attack him. My problem is that you can click yourself and attack yourself. That, is obviously a big bug. How can I fix this?
My second question is how do I make it so that clicking on yourself does something different than clicking on someone else?
Copyright © 2025 BYOND Software.
All rights reserved.
Ok Here is a example:
mob/Click()
set src in oview(1)
if(usr==src)
//Do something else
else
Attack(src)