• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Controlling stacking order of code-created instances

L

ladlon

Guest
Hi. I'm using Gamemaker Studio Pro 1, and have run into something which I can't seem to find an answer to.

I am creating random playfields (platformer), so pretty much everything is being placed on the screen via coding, rather than manually placed by me.

As a result, I noticed that the stacking order of the instances is not what I want, yet (unlike GMS2) I don't see any means to control the stacking order. I do see an instance order window, but that seems to only apply for items manually placed on the screen by the game author, not by coding.

The only thing I could see as a possible solution is the instance's depth attribute, but I'd have to sort out how to address it while in another (game control) object's coding window (where the actual 'dungeon' generation occurs). I think it will probably have something to do with a With command, but I'm still in the process of learning most of GMS.

Could someone please tell me the ideal method of controlling the stacking order of code-created instances? (ex. ladder instances being placed OVER TOP of floor instances)

Thanks...
 
Top