layer

  1. Masstertron

    instance_destroy() doesn't work on parent objects

    Hi everyone! (GMS 2.3) I've noticed that using instance_destroy() doesn't work for children objects. For example, when I use instance_destroy(obj_enemy), my expectation is that all enemies, including child-object enemies (eg: obj_enemy_bird, obj_enemy_fish) are destroyed. What happens is no...
  2. C

    High range of depths vs small range depth

    Does anyone know if there is a difference in performance for using a high amount of depth layers vs a low amount. Say I have 3 layers, a foreground, middleground and background. I can set these layers to depth value: -10 0 10 or I can set them to: -1 0 1 Is there any difference in these...
  3. FoxyOfJungle

    SOLVED Click on the TOP depth instance of a layer??

    Hello! I want to click on the instance that is on top of the others, but make the loop only on a specific layer. The function I have works the way it should: The above function is an adaptation of this video. However, if I check objects from another layer, this happens: (The left...
  4. David Lorenz

    GMS 2.3+ [SOLVED] Apply shader to a single tile layer as a whole

    Hello everyone! I've been working with Game Maker for almost 2 years now, but I've barely touched shaders and surfaces. Lately I've started playing with both and found myself stuck very often. :/ I want to use a shader only on one tile layer, but I noticed that with the layer_shader and...
  5. Telorr

    SOLVED Moving Objects to Another Layer

    Hi! I need your help. Can I move an object to another layer? Example, I want to move object "A" which originally from layer "X" to layer "Y". If you know how to do this, please answer my question. Thanks!
  6. S

    GMS 2 Defining object depth by creation order

    hi I'm working on a pen&paper helper thingy that creates objects upon pressing a button (like map object;walls etc.). It's crucial that the last created object is overlapping all previously created objects and I dont know how to get that working. Sorting the depth by y-value makes no sense, I...
  7. Yizzard

    Weird Layering Glitch Upon Loading a Save File

    Hey so I have a game where in the intro room there are a bunch of office workers sitting behind desks in their cubicles, basically the worker is an object, the desk is an object and then the cubicles are two objects, a blue background object and a green foreground object. When I start a new game...
  8. Kezarus

    layer_sprite_at(layer_id, x, y)

    Hi! Pretty straight foward. Is there a function that I can get the sprite that I created before in a layer using layer_sprite_create() ? I can't find it in the manual. Sorry for the dumb question. Thanks!
  9. Strakee

    Drawing on specific layer only

    Right now I have a blood drawing mechanic that draws on a simple area surface. It works like this: An object is created and as it flies it draws itself repeatedly on the surface like a brush. The goal is to make it not draw itself on the background. (The blue part in the image is a background...
  10. Posho

    3D Flipping a Layer?

    Hello :) I've been trying to figure out how to do 3D with billboarded sprites. I've been reading a bit into how GMS2 works and found out everything is already being rendered in 3D. Turns out you can draw regular GM sprites in the XY plane and adjust their "Z" by using the layer's depth...
  11. J

    Referring to background layers help

    Hey all, if (layer_exists("Mountains")) { layer_x("Mountains",x/2); } Thats working great but I want to refer to its sub layers as well, I have selected "inherit sub layers" on my background layer but still doesnt seem to work also wont work if I put them in a folder and...
  12. MIkadini

    GML layer_id

    I see in the Space Rock tutorial that for create the parallax effect i must use layer_xy, but if i go in the documentation i see that if i use directly the layer name ther's an impact on the performance, how can i use find the layer id? for save at the room start in an array for example?
  13. Adry

    Change pixel resolution of a background_layer?

    Hi GM community! I'm fairly new to programming but was wondering if any one could help me out a bit with this conundrum of an issue.. I have a game that is 160 x 140. However I have set the window size to (380 x 340) which is a 3x magnification for the pixel art. now my question is this.. Is...
  14. Nathan

    Mac OSX Solved

    https://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/instances/deactivating_instances/instance_deactivate_layer.html Per the manual it says" You need to supply the layer ID, which can either be the name of the layer as written in the code editor (as a string) or the actual...
  15. rawket

    GMS 2 Help with sprite change on asset layer

    So in an object I have this code for room start if areas_coastal == "burned" { layer_sprite_change(layer_sprite_get_id("buildings", "spr_diner1"), spr_diner1Burned); } It runs but the sprite doesn't change
  16. F

    Cutscene Performance: Sprites versus Layer Changes

    My game performs fine but I see value in learning optimization now for future application. I have some segments of the game which are simple animated scenes that react to very limited inputs (space to start, space to stop... that sort of thing) and so far I have been building them like old...
  17. Binsk

    GMS 2 Instance Deactivation and Depth

    Howdy, Alright, so I've always avoided instance deactivation and generally handled the 'deactivation' bit myself. However I am designing an extension that requires I "pause" objects regardless of how the user of the extension has programmed them. Because of this I am trying to use deactivation...
  18. Cofefe

    Question - IDE Drawing Individual Layers of a Sprite

    Hi guys. So I've got a question related to drawing the layers within a sprite. I mean the layers like the ones inside the sprite editor, not the 'Sprite Layers' which you can create in the room editor through code. The reason I ask is because I am currently making a game where I assemble the...
  19. D

    GML [solved] Specified layer does not exist

    Hello GMC. I just created a new project in which I use different control objects, each one responsible for managing a different module of the game. Since instances are organized in layers I wanted all of my control objects to be in a single "control" layer. In order to do this in the first room...
  20. N

    Windows [SOLVED] Objects hidden by new empty layer

    Hello, This afternoon, I've been encountering a very weird issue, and I'm not sure if I did something wrong or if it's a bug. Basically, I added in my room a new layer "Blood" which is empty (and filled when killing an enemy) and it made my walls (from another layer) disappear. Walls were still...
Top