mob/verb
Select_Target()
set category="Commands"
var
list/piv=list()
mob/attack
for(var/mob/M in oview(7))
piv+=M
attack=pick(piv)
if(attack == usr||get_dist(attack,usr) >= 10)
return
if(attack==usr.target)
usr.DeleteTarget()
return
for(var/image/x in usr.client.images)
if(x.icon=='target.dmi')
del(x)
var/image/I = image('target.dmi',attack)
usr<<I
usr.target=attack
usr<<"You target [attack]"
ID:160724
Jul 29 2008, 5:09 am
|
|
Ok im have a targeting system and it works fine but i want to adjust it to cycle through mobs instead of just randomly pick one, obviously if your using the mouse to target it doesnt matter but i want the player to be able to use only there keyboard if they want. Heres the code:
|
In response to Generation
|
|
That would be good if it was in Click or DBLClick ;).
|
In response to Generation
|
|
See the problem with that is there is a pop up window that ask you which mob, im trying to avoid that for speed, if you look at my code it automatically does it. The only thing i would like to see different would be if it would cycle through the mobs starting with the closest.
|
In response to NightJumper88
|
|
In your code, it randomly picks a target. Is that what you want?
|
In response to Generation
|
|
no thats what im trying to fix instead of random i want it to go with the closest person first then the next closest and so on.
|
mob/verb |
If you got questions dont hesitate to ask :)