turf
Click()
for(var/mob/unit/B as mob in usr.selected)
walk_to(B,src)
mob/unit/
Click()
if(src.s==1)
if(src.onwer!=usr)
usr<<"You cant select units that dont belong to you!"
return
usr<<"You unselected [src]"
usr.selected-=src
var/icon/I=new(icon='aaa.dmi'+"[usr.red]",icon_state="1")
src.overlays-=I
src.s=0
else
if(src.onwer!=usr)
usr<<"You cant select units that dont belong to you!"
return
usr<<"You selected [src]"
usr.selected+=src
var/icon/I=new(icon='aaa.dmi'+"[usr.red]",icon_state="1")
src.overlays+=I
src.s=1
Problem description:
Edited: It wont move and when i try to unselect(clicking second time) it says:
runtime error: type mismatch: Worker (/mob/unit/Worker) -= Worker (/mob/unit/Worker)
proc name: Click (/mob/unit/Click)
usr: Karffebon (/mob)
src: Worker (/mob/unit/Worker)
call stack:
Worker (/mob/unit/Worker): Click(the grass (11,19,2) (/turf/grass), "default.map1", "icon-x=15;icon-y=21;left=1;scr...")
You unselected Worker