mob
DblClick()
if(src.client||src==usr)
return
if(src.owner==usr.key)
src.overlays-=image('Others.dmi',"owner")
src.owner=""
else
for(var/mob/M in world)
if(M.owner == usr.key)
M.overlays-=image('Others.dmi',"owner")
src.owner=usr.key
src.overlays+=image('Others.dmi',"owner")
turf
Click(turf/T)
for(var/mob/M in world)
if(M.owner == usr.key)
if(M.bussy)
return
walk_to(M,T)
sleep(2)
while(get_dist(M,T) >0)
sleep(2)
Problem description:
I'm making a RTS game and my current select0unit system is bugged. Can someone post link to better one?
The current one is too buggy and lame, it selects more then one unit, they get buggy while moving, ect.
This allows you to select and move units.
Also, only >you< can see which units are selected.
NOTE: be sure to give the mobs an owner,, otherwise you won't be able to select/mvoe your units.
NOTE #2: I used walk_towards instead of walk_to, because when you have multiple units selected, and you tell them to mvoe using walk_to, only one mob will arrive at the turf, and the others will start to walk around him, trying to get into the turf. walk_towards doesn't include dense objects, so...
Well, if you have any doubts, contact me.
<font color=silver>[email protected]</font>