• 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!

depth

  1. H

    Changing object depth for player to move around the object?

    I'm trying to make my character sprite go in front, but also behind both of the planter sprites. They are currently set at 0 depth, whereas my player is set at 1 depth. How do I change the depth of the planters depending on where the character goes?
  2. S

    Windows Depth Not Working Correctly

    My character won't stay behind the fence, i'm new to coding, and i'm having trouble fixing the code i'm using to allow him to stay behind the fence even when attacking...
  3. jobjorgos

    Legacy GM [SOLVED] always show object on top of other object which has relative depth

    Hey I want obj_boots always be shown on top of obj_peg (the player) in a 2d top-down (fake 3d perspective) game. obj_boots Step Event: depth = (obj_peg.depth + -1); But this doesnot work so I wanna make sure if anybody can confirm if this piece of code is right? Greetz jobjorgos
  4. S

    Drawing on top

    I currently have an enemy which creates a gun when it spawns (create event). I would like the gun to sit on top but I can't seem to get this to happen. Even though the depth of the gun is lower than the enemy, it is still hidden behind. How do I fix this? The gun is attached to the enemy and...
  5. M

    Legacy GM Objects behind other objects are still pressable

    Hi, I have a simple UI consisting of a ball, a score bar at the top, and a back button in the top right. The ball and button are supposed to be pressed. I recently wanted to add a background object, which when pressed, (when you miss the ball) turns red and takes you to a another screen. However...
  6. A

    GML SOLVED Parent object's depth != children objects' depth?

    Hi all, I have a parent object (magic projectile thing that the player can shoot) with some children objects of it and its all working fine, except that I want to make all the children objects have a specific depth that I assumed could be set in the parent object's depth. But when I change the...
  7. K

    GameMaker [Solved] Question: One Layer, Multiple Instances with different depth?

    Edit 1: As far as i can tell layers work in a way that they have a fixed depth and only can contain instances with that depth. As a result creating instances on a layer has little effect when you change the depth of them afterwards. To work around this i created a global variable which i made an...
  8. A

    GML SOLVED Need help changing object depth during sprite animation

    I have 2 sprite-objects: the player one and a magic spell one and I want the magic spell sprite-object to "wrap around" the player. to accomplish this I want the first few subimages of the magic spell sprite-object to draw behind the player object, and the rest of the magic spell subimages to...
  9. P

    Question - Code Why explicitly changing depths...

    Why explicitly changing depths also changes the depths of other layers? Take a look at this code: AddHitEffect is just a function to create an instance using instance_create_layer, but when I change the depth of the Trail object, it permanently changes the depth of the layer...
  10. I

    Question - Code Depth and Layers in GMS:2

    GameMaker 2 overhauled and improved the layering and depth system. At the moment I can't get my head around the new system. I've read the manual regarding how the new layers work and how its more efficient, but I just can't seem to get the objects and tiles in my room to draw in the correct...
  11. I

    Isometric Age of empires like depth problem

    hello this is my first post, i don't know if i have to present myself in another section (in that case sorry). i've been experiencing some top down pov but i would really like to make an isometric game ( i have basic skills and i've been coding since almost a year), problem is that anything i...
  12. P

    Question - Code how to [tile_set_depth] in GMS:2?

    as the title says.... the function tile_set_depth got removed from GMS:2 so I'm having a hard time now getting my top-down RPG game to work with walls made from auto-tiles and objects/players "behind" these walls the main reason I moved to GMS:2 was auto-tiles so how is it possible in GMS:2 to...
  13. S

    3D Wrong sides of 3D cube being drawn

    I'm working on a new 3D puzzle game for iOS. When running the game on my iPad, it appears that sometimes, a few sides of a 3D cube, which are drawn last, will appear in front of other sides, even if they are on the opposite side of the cube. Each cube is made of 6 primitives. Here is how one...
  14. M

    GameMaker Question about new Layer System and Depth

    Hey there~ I've searched for an answer in the manual, the forum and on tutorials but i didn't found one. With the new Layer System in GMS2, i am wondering how to get a similiar effect like with depth = -y i know i could just use "-y" but i am worried it might be slow and not the way it's meant...
  15. A

    GameMaker How to set tile depth and alpha in GMS2...?

    So I'm hoping to be able to set tile alpha dynamically in game. However in GMS2, functions like tile_set_alpha and tile_set_depth have been removed/changed, and I can't seem to find any info on how to do it now in the documentation. Anyone know? Either way, thanks for reading. P.S. My end goal...
  16. S

    Legacy GM [SOLVED / FOUND BUG IN GM] Depth / Drawing order is not working properly

    Gamemaker is ignoring depth or drawing order, I have tried with using just the draw event of each object normally and also an object that does this in the End Step: with (all) depth = -bbox_bottom that didn't work so I also tried with a priority queue and populating it each frame and then...
  17. P

    Legacy GM [SOLVED] Depth problem - Image to demonstrate

    I think it's enough to see where is problem. So is there some easy way, maybe some kind of script...? to make it how it's supposed to be?
  18. M

    GML beginner (SOLVED)

    Hi there, I'm completely new to programming and making games, have wanted to make one for a while and after seeing the Humble Bundle deal for GM last Autumn I decided to take the plunge and have a go. I have been following Heartbeasts "Beginner's Guide to making an RPG" and am still in the early...
  19. S

    Attempting card mechanics - Issue with depth & detection

    I've been tinkering with GMP & really enjoying it. Right now, I'm trying to make card mechanics (decks, tableau, etc). My issue is with a tableau. I have an obj_Stall which has both the sprite for the tableau as well as the ds_list of the cards in the tableau. My current collision detection is...
  20. m0zzy

    Legacy GM Depth problem.?

    Im trying to do the most Basic of things, and its not working.. Im trying to give the illusions of going down a tunnel by drawing a circle sprite on the screen but making it bigger with x + y_scale.. but im trying to put another sprite on top of it but its going underneath it so i cant see the...
Top