ID:2194257
 
(See the best response by Nadrew.)
How can I change the icon of an atom at runtime??

like this
    unit.icon='[unit.NewState].dmi'


do I need the icon proc or is there another way??
Best response
Ideally, you'd be using icon_states for things like this, but if you can't, you'd need to use double-quotes and include the icon file with the host package (as it would be referenced as a file and not an rsc entry).

Single-quotes basically tell the compiler to store that file in the rsc to be accessed later without requiring you distribute the raw file, they're constant expressions (different from constant variables) in that they can't contain any runtime expression (things within brackets).
I thought so I just hoped for a better solution I'll see if I can use icon_state for this.