having a error trying to check the depth from another object, says for an error "unexpected epression" code is below. anyone know why?
if place_meeting (x,y, obj_oilman_2) && with obj_oilman_2 depth = -101;
image_speed = 0.1;
Hey GameMaker community! So I'm trying to make a basic script that assures that shadows will always appear in front of the player but always appear behind the object they're the shadow of. For this I'm making code that, when the shadow collides with the player, changes the depth value of the...
Hey GameMaker Community! I've been working on a top-down game and have run into an issue with the depth system. I have two scripts that seem to be causing this error: scr_create_draworder, which creates the draw_order and draworder_size variables I'm using to store the grid size, as well as the...
I need to make something that will return the top most instance where the mouse cursor is currently clicking. This is probably different in Studio 2, so how would I adapt the code below? It doesn't matter if the draw order is always the same, just that I can find from multiple instances at the...
I have an object drawing some sprites and emetting some particles. The particles options are set in the create event.
The first game, particles are under all my sprites, which is what I want. But if I make another game/match, the particles are over it.
In the create event I...
I need to draw a sprite at a specific depth in order to fit between layers, but I also need it stretched to double its current size.
Option 1: Create a second sprite which is double its size, move it to an object, and draw it at depth. There are many sprites and this seems horribly tedious...
I've been struggling to determine the best way to have collisions and depth for an isometric game my team is making. I've been able to get some objects working properly, like a bus, but I had to split the bus into two parts, so I could also use a diamond collision mask. However, this game...
When u want to click top object and did not set depth of those objects the top object will not be clicked but actually the clicked object will be the first one placed in the room. But when you set depth each of those objects manually the object with the lowest depth will always be clicked.
Probably has a simple solution but I can't seem to find it- I generally put my character in a layer below foreground objects to allow for a feeling of depth, but now that I have several rooms that doesn't work after the player has changed rooms because
a) if there is already a player...
So when my character gets hurt, he is instance layer create switched with a hurt version of himself, but the instance is a lower depth than the floor model so you can't see him... Does anyone know a fix?
So. i'm using depth = -y to make the effect of going behind trees.
My tree is:
so the shadow is under the tree.
But when my hero goes behind the tree (depth = -y goes into effect), the tree shadow shows on top of the hero. when the hero is in front of the...
I imported my GMS 1.4 game to GMS 2 and boy it has not been smooth. One new issue I hit today:
I have a button, a persistent object at depth 0. When the player presses it, I change the depth to -100 to bring it above some other stuff. Later, when they press it again, I put the depth back to...
I have found some weird behavior in GameMaker during the making of my current game and need some advise on how to fix this.
I was able to reproduce it for a very simple case:
Consider a 2D topdown game where a player object can move through the room. Also, there are some tree objects.
How can I set the depth of one instance?
Because my semi-solid-platform (one way platform) appears in front of the other semi solid platforms.
But I want it as in the room editor:
That the 2 bottom platforms are in front of the top one.
I knew about the object_set_depth function...
I've created a particle system and emitted some particles (I've tried this by directly creating the particles and by using an emitter).
globalvar particleSystem, bloodParticle, bloodEmitter;
So one thing I just noticed is that if I switch away from a persistent room and then switch back to it the depth of some objects get changed. You can see this happening in this video: https://gyazo.com/d92e7fe0d38b8de2fd73c0b36e664508
Do you guys think this is a bug or should I just accept that...
Hi everyone !
I'm still struggling with my depth system for my top-down game in "fake" 3D.
So, here's the situation :
I set a z axis for "height" and created several collisions objects for my different levels. (My levels are based on a 32 pix height per "z unity")
My depth system's like depth =...
Hi everyone !
Oooook, that one is VERY tricky and I have no idea how to do that but I'm going to try my luck if someone has a solution !
In my game, I have two type of tiles for my graphics.
Some ones are flat : The floor, aaaand anything else which is flat and set on the floor.
Other ones have...