ID:170066
 
Now, I've got a new problem. Anyways, I have no clue what to do about this.

client/Click(mob/M)
if(usr.targeted == 0)
usr.targeted =1
usr<<"<font color=red>You targeted [M]!</font>"
sleep(10)
src<<"<font color=red>[usr] targeted you!</font>"
M.overlays += 'Enemy1.dmi'
usr<<"<font color=purple>Countdown until target is out of reach."
Question()
sleep(20)
usr<<"<font color=teal>3.."
sleep(25)
usr<<"<font color=teal>2.."
sleep(30)
usr<<"<font color=teal>1..."
sleep(50)
usr<<"<font color=blue>Your target has vanished!"
M.overlays -= 'Enemy1.dmi'
M<<"<font color=red>You are out of reach of [usr], now!"
sleep(78)
usr.targeted =0
else
usr<<"<font color=yellow>You targeted something already!"
return


mob/var
targeted =0



proc/Attack()
var/mob/M
if(usr.targeted == 1)
switch(input("Do you wish to attack [src]?", "Choose") in list ("Yes","No"))

if("Yes")
view(3)<<"<font color=blue>[usr]: Now launching a fake attack on [M]!</font>"
Weapon()
sleep(12)
src<<"<font color=aqua>Um.. this is where I get attacked, right? Oh, anyways its just a test for now anyways!"

if("No")
usr<<"<font color=red>Wha..t?"
return

proc/Question()
var/mob/M
if(usr.targeted == 1)
switch(input("Do you wish to attack, this turn?", "Choose") in list ("Yes","No"))

if("Yes")
usr<<"<font color=red>General: Now, attacking [M]!"
sleep(34)
Attack()

if("No")
usr<<"<font color=blue>General: Fine, call off the attack.."
return

proc/Weapon()
var/mob/M
if(usr.targeted == 1)
switch(input("Launch what?", "Choose") in list ("Missile","Noithing"))

if("Missile")
usr<<"<font color=maroon>The missile has been launched!"
s_missile(/obj/missile,usr,M)
src<<"Ugh.. I been hit.. lol!"

if("Noithing")
usr<<"<font color=blue>You launch noithing!"
return


The thing is first of all is that the missile comes back to me. Even, though its just testing. Anyways, second of all I want it to select mobs only and when I click the grass turf for example it targets that not the mob itself or me.
Yeah, that is a lot of usr abuse. I'll find the BYONDscape articles to help you.
In response to N1ghtW1ng
Alright, then.
In response to N1ghtW1ng
N1ghtW1ng wrote:
Yeah, that is a lot of usr abuse. I'll find the BYONDscape articles to help you.

Personally, I recommend the usr lecture, but I'm biased: I wrote it. =P

The article that Nightwing was talking about can be found here.

Read both! You'll end up learning even morefor it!
In response to Wizkidd0123
I read both and understand a bit more, now. Thank you. I've also fixed the problem, probably not fully but it'll do for now.