ID:272147
 
1. How would I set so that the users target2 variable is the one that gets attacked by whatever spell they are about to use but still retain the value of M so that I don't have to use my old DC(M) proc.
mob
DblClick()
if(src == usr||get_dist(src,usr) >= 10)return
for(var/image/x in usr.client.images)
if(x.icon=='flash.dmi')
del(x)
var/image/I = image('flash.dmi',src)
usr<<I
usr.target2=src

mob
verb
Dagger_Throw(mob/M as mob)
if(usr.doing==0)
if(usr.Daggers>=1)
usr.doing=1
missile(/obj/magic/overlays/SwordMissile1,usr,M.loc)
var/hitrmiss=rand(1,10)


2. How do I color text? [font color=red] doesn't work(can't use html arrows on this page or it will work >.>).
For the first question, I haven't the slightest idea what you're asking.

For the second question, you have to add the quotes, but you have to escape them, e.g.:

world << "<font color=\"red\">If you want blood  --  You've got it!</font>


Would show <font color="red">If you want blood -- you've got it!</font>
In response to Darkmag1c1an11
Thanks. For the first part, I'm wondering how to throw a dagger at target2 and no one else
In response to Blink182_98f
Use target2 instead of M.
In response to Garthor
Would that still retain the value of the users target?
See, my real problem here is that if I change it to target2 instead of M, it will attack a random on of the mobs if they're all the same. I want it to attack the selected person that is selected by double clicking the person you want to attack.
In response to Blink182_98f
Then you're doing it wrong, because that's not what would happen.
In response to Garthor
Then could you please explain what to do to fix this problem then?
In response to Blink182_98f
Use target2 instead of M.
In response to Garthor
Just replace M with target2? Tried that. It acts just like M
bump =)
mob
DblClick()
if(src == usr||get_dist(src,usr) >= 10)return
for(var/image/x in usr.client.images)
if(x.icon=='flash.dmi')
del(x)
var/image/I = image('flash.dmi',src)
usr<<I
usr.target2=src

mob
verb
// Dagger_Throw(mob/M as mob) <-- you dont need this
Dagger_Throw()
if(!(src.target2||src.target2 in view(src,10))) return
if(usr.doing==0)
if(usr.Daggers>=1)
usr.doing=1
missile(/obj/magic/overlays/SwordMissile1,usr,src.target2)
var/hitrmiss=rand(1,10)