ID:2556172
 
(See the best response by Marekssj3.)
mob/NPCs
icon='NPCs.dmi'
Frank
icon_state="Frank"
MaxHP=100
Pwr=7
Arm=7
Click()
world<<"[src.name]"
icon_state="FrankSel"
Karl
icon_state="Karl"
MaxHP=150
Pwr=6
Arm=6
Click()
world<<"[src.name]"
icon_state="FrankSel"</b>


Problem description:
Hi,
So the above code works as long as my NPCs.dmi file has an icon state for EACH NPC. That state is basically a border around the icon to show it is selected. Originally I tried to make it another dmi but it messed with the transparency. When I do searches, I guess the term selection applies to many other cases so I can't find any references to help me.

Any suggestions on how to accomplish this in a efficient manner.

Thanks
Best response
Im not sure if I understand, but I think you want make select effect for any npc without making extra icons.

Keywords are filters and outline

http://www.byond.com/docs/ref/index.html#/{notes}/filters


http://www.byond.com/docs/ref/index.html#/{notes}/filters/ outline
Exactly what I wanted, awesome, thanks!
Also, if your want all those NPCs to behave the same, you can consolidate the Click()s by defining it as mob/NPCS/Click() instead of mob/NPCS/a/Click(), mob/NPCS/b/Click(), etc.