ID:1201684
 
(See the best response by DarkCampainger.)
Hey guys, I'm having some issues whilst mapping and I'm looking for some help on a solution to relieve the situation. To get the turfs on the Map I usually just program in the main Icon file then generate instances from icon states, my issue is when I run the game it goes glitchy and some of the turf layers don't show.

here's a screen shot to demonstrate:

this is in game:


this is in map:


I'm also having an issue where sometimes it will just show the completely wrong instance/state in game that's not on the map.

this is in game:


this is on the map:


Any help anyone could provide would be great, I've no idea what is causing it to happen and how to alleviate it, thanks in advance.
Best response
Does your default/base state have a blank icon_state name? If the icon_state of an overlay is blank, it will inherit the icon_state of the atom it's attached to.

So if you layer a turf with the state "south-edge" over a turf with a blank state (""), the latter will inherit the "south-edge" state at runtime. The dir variable has a similar issue (although I think it has a bug where it always inherits, even if it was set).

If that is the problem, the solution is just to give your base state a non-blank name.
In response to DarkCampainger
DarkCampainger wrote:
Does your default/base state have a blank icon_state name? If the icon_state of an overlay is blank, it will inherit the icon_state of the atom it's attached to.

So if you layer a turf with the state "south-edge" over a turf with a blank state (""), the latter will inherit the "south-edge" state at runtime. The dir variable has a similar issue (although I think it has a bug where it always inherits, even if it was set).

If that is the problem, the solution is just to give your base state a non-blank name.

Thanks DC, you've saved me from baldness due to pulling my hair out over this. It was exactly as you said so it's all fixed now.