ID:1293186
 
Hey guys noobish programmer here. While I am really making progress on my first game, I started on Overlaying. I checked out some libs and demos, but none really helped. I would like an overlaying and underlaying program that allows hair to be put under hats or helmets,but if the hair is long enough it will still show. Same for clothes. My current program isn't really doing this but it works.
Use the help area (F1 I believe) and search up overlays, it should provide an example of how you can do it.

You can also search it up in the resources here on the website, to find a library or demo that can show you in a little more detail, how it is done.

Edit: Guess I really didn't read your post that well, must of skimmed through it, just read kaio's post.
You want to use layer for that.

Objects and overlays will show up over others with lower layers.

There is a special kind of layer, called FLOAT_LAYER. Basically, any negative layer will cause this effect: as an overlay, only show up on top of the anchor and its overlays, but not over other objects on the map. Their layers only interact with other overlays on the same anchor. This is useful for equipment, because if you have a high-layered overlay and your player walks under an archway, your player will be below the archway, but the overlay will appear above it.

For your example, you want hair to have a lower layer than hats and helmets. You could give hair a layer of -2 and hats and helmets a layer of -1.
Note, you can set layers to images and use them in overlays/underlays.
Hmmm. heres another problem i ran into. when i start my game after a reboot, my char is still wearing overlays. this is cool. but my char is no longer able to move.... What do i do???
@BoyDolphin: Perhaps you should make it so you don't need a file per icon state in your library? Also it's probably better practice to make creation and such as on-screen HUD objects rather than an actual location in your world.