layer

  1. M

    Windows Hi, I'm new. How to place player on top of an object?

    I have two layers. One for the player and one for the floor. When I try to place the player object on top of a grass object it is not aligned with the grass object.
  2. MarceloP

    HTML5 Function layer_instance_get_instance() not defined on HTML5

    Hello, Seems that the function layer_instance_get_instance is not defined neither for the HTML5 export, Test and Debug. I've created a simple example with nothing except a call of this function and I get the same error. How come this function does not exist in HTML5? Should I file a bug...
  3. Z

    Layer Depth Assignment From An Object To Another [SOLVED]

    Hi everyone ! I have two objects : - The first one is the one the player controls. Named "PLAYER". - The second one is an object (rather a group of objects) distributed on several layers. Each layer has its own depth and each object from that group take the depth of the layer on which it has...
  4. The-any-Key

    Question - IDE (SOLVED - workaround) Change layer depth on inherit layer

    I got a rm_init where I have a layer "Machine" at depth 0 where I have an persistant instance obj_machine. rm_init is parent to rm_world. In rm_world: When I click Inherit in the room editor I see the "Machine" layer at the bottom of the layer order. Auto assigned to depth 600. I disable the...
  5. MarceloP

     Set object's draw order on "instance_create_layer"

    Hello guys! I'm working on a prototype and I've reached a moment where I'd like to create some objects on a Instance Layer. I called "instance_create_layer" and got what I wanted. But since I have more than one thing that will be "dynamically instantiated" I ran into a problem. When calling...
  6. DarklinkFighter

    [SOLVED] Changing depth and using instance_deactivate_layer?

    Hi, I encountered an issue with my game after I tried to change the way my pausing works... Previously I created a screenshot sprite and deactivated all Instances but reactivated some controller objects... Now I tried to implement an Inventory and for that I refactored it to...
  7. S

    GMS 2 delete all objects within specific layer

    Hi all I am using the code below to delete all enemies within the layer "enemies" when the object containing this code is created. unfortunately there are 2 issues: - the first created enemy will not be deleted - the code deletes also some objects within other layers (this is really critical...
  8. HayManMarc

    Using #macro's for layer ID's?

    Hello programmers, I'm wanting to make my room layers easier for me to see and write (in my code) so I was going to use #macro's for this. But I'm not sure which way would be better. Do you? At first, I was going to do it like this, in the Create event of a control object (where I do all my...
  9. M

    GMS 2 How to Structure Room Layers for a larger game in GM2

    Hi Game Makers, I'm having issues with the new layer system and room. I just don't know what the best way to go about organizing my rooms and layers. I want to have every room have a default set of layers, but I if I use the Parent/Child system, I can't organize them inside folders (Per...
  10. Chaser

    Question - IDE Make asset layer tillable

    hi everyone, With the disappointment of not being able to change the tilesets during run time, it has been suggested to use asset layers instead. I’m struggling to figure out what I need to do and assign a sprite to an asset layer. When in the room I select “new asset layer”, but then I’m...
  11. S

    GMS 2 [SOLVED} Determine layer of instance

    Evening all, Is there a way to check what layer an instance is on? I need to amend a sprite's origin based on the layer it is on. Seems like a simple question but I can't seem to find it in the documentation. Any help would be appreciated! -Snayff
  12. P

    GMS 2 Layer based collision detection?

    I'm working on a level editor for my game and one of the things I want to add is Transparent tiles so tiles that can overlap other tiles. However I don't want theses transparent tiles acting with non transparent tiles so I was wondering if it is possible to only do collision based on layer...
  13. B

    GMS 2 Sprite having multiple depth?

    Let's say my game have a desk with a chair, and a character. I want character to come to the desk, sit on the chair and rest his hands on top of the desk. The problem is that his legs should become covered by the desk, while his hands should be covering parts of the table. I can make one sprite...
  14. A

    Problem With " Instance_Create_Layer "

    Hello, I have a problem ... After firing my pseudo-game, the code error pops up.
  15. K

    GMS 2 Persistent Objects' Layer Issue

    Hello, I have two rooms, one is a duplicate of the other with the exact same layers (name and depth), just different contents. The first room has the player (persistent object) in the "Player" layer and the second room has the same "Player" layer without the player object. I am testing by...
  16. R

    GMS 2 [HELP] Getting all instances of objects in object layer ?? [Solved (kinda??)]

    Hello, I'm working on an top down RPG. Ive gotten my depth and stuff sorted out but I've run into a problem. I want my collision to be untied to the tiles, that's why im using physics and objects as collision. You can see my problem in this screenshot: The blue marked part is one floor higher...
  17. M

    Shaders Shader on tile layer

    Hi, I'm trying to apply a wave shader on a tile layer but seem to be screwing up :) The goal is to make a grass tile layer wave so it looks like it's under water. I tried to do this: layer_shader("lr_tile_grass", shd_wave); The shader gets applied, but on every grass tile separately, which is...
  18. C

    GMS 2 Add Instance to Layer

    Hello, I'm trying to have the player object remain on a layer that has the same name throughout all rooms in the game. When I start the game, I do receive an id number when debugging and the same is true when I change rooms. However, when I go back to the original room, the game freezes when I...
  19. C

    Question - D&D instance_create_layer :: specified layer "Gun" does not exist

    Hey Guys, first of all, I am not a pro and this is one of my first projects. Thats why I use Drag and Drop and not GML. Now I wanted to give my objects diffrent layers, so I created new sublayers and renamed them. I want that the spaceshuttle has the biggest depth then come the bullets and then...
  20. M

    Existing Layer reported as non existing

    if place_meeting(x, y, obj_Enemy) { show_debug_message(layer_exists(Player)) instance_create_layer(x,y,"Player",obj_Knight_Die) global.playerDie=true instance_destroy(obj_Knight) } I have an existing (pre-fabricated Layer called "Player" but it doesent seem to exist at run-time since...
Top