ID:263772
 
Code:
atom/Click(mob/A)
usr.target = A
usr << "You're now targetting, [A]."


Problem description:
It targets the ground the mob is standing on, not the mob. I know this will need if statements later to get my desired results.
Why dont you just do mob/Click()
In response to Sup3r 17
Doesn't work, i've tried that. I experimented with solutions for roughly 20 minutes unsucessfully, and that was one of the many experiments.
In response to Mr.Tophat
Check to see if you are overriding the Mob/Click by using it already in some other part of your game your not aware of.
mob/Click(mob/M)
..()
if(ismob(M))
usr.target=M
usr<<"You're now targetting [M]."


You sure that doesn't work?
In response to Kaiochao2536
Kaiochao2536 wrote:
> mob/Click(mob/M)
> ..()
> if(ismob(M))
> usr.target=M
> usr<<"You're now targetting [M]."
>

You sure that doesn't work?


mob/Click()
usr.target=src
usr << "You're now targetting [src]."



That should be fine. Since its under /mob it should always be a mob, and the src would always be the mob being clicked. Unless I'm just being stupid right now...
I'm not overriding it, the coding gurus at Chat helped me. It's src not mob/M. I was referencing the location, how silly.