• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Layering effects on top of objects (DnD)

T

Trees_Mcknees

Guest
Hey guys, I'm making a simple breakout clone but with a twist, and I'm trying to add some effects when one of the bricks get destroyed. as you can see in the link to the vid below when a block is destroyed the effects are created behind the bricks. Any help on how i can get this layering in front of the bricks?

Vid link: https://streamable.com/fk8xzv

Cheers :)
 

Slyddar

Member
Are you in GM2? If so, you need to create the effect on a layer that is above the bricks layer. If it's GMS1, you need to set the depth of the effect to a lower value than the bricks.
 
T

Trees_Mcknees

Guest
Yeah i'm using GM2, Would that be a case of creating a new instance layer? I'm sorry i'm still pretty new to Gamemaker. The main thing that confuses me is that i've created the effect as an event within my brick object so it's essentially tied to obj-brick right? Is their a way to separate the two to layer them?
 

flyinian

Member
Yeah i'm using GM2, Would that be a case of creating a new instance layer? I'm sorry i'm still pretty new to Gamemaker. The main thing that confuses me is that i've created the effect as an event within my brick object so it's essentially tied to obj-brick right? Is their a way to separate the two to layer them?
You can if you want. You can also use the room editor, use the built in variable "depth" or you can use "instance_create_depth/layer".

You could make a controller object that is created at a specific depth and have it draw the effects.
 
Top