gml 2.3

  1. firestar

    SOLVED Child has 1 frame delay

    with (instance_create_layer(x, y, "coolBullets", coolObjectBullet)) { speed = 14; direction = other.image_angle + random_range(-3, 3); image_angle = direction; } This is the the part of my code where I add the gun to the character but the problem is whenever I...
  2. firestar

    GMS 2.3+ *Solved* Sprite can move only when airborne

    //Get player input key_left = keyboard_check(vk_left); key_right = keyboard_check(vk_right); key_jump = keyboard_check_pressed(vk_space); //Calculate movement var move = key_right - key_left; hsp = move * walkspd; vsp = vsp + grv; if (place_meeting(x, y+1, coolObjectWall)) && (key_jump) {...
  3. libragenmu

    SOLVED Bugging Audio

    So i'm triyng to put a simple music to be my background music, i tried to put on my obj_player and in my obj_title_menu and both play the music but like a million musics at the same time (as if it's creating and playing the musica every second). I don't have much code for this part, so i think...
  4. 1tsmey0sh1

    GMS 2.3+ Depth not workihng properly after breaking an object

    So this is the code //depth with (all) { depth = -bbox_bottom; // held item if (_playerexists && _helditem == id) { depth -= 30; } } hope someone can help me (in the pics 1 2 and 5 you can see the depth working properly on the pics 3 and 4 you can see the depth not...
  5. AsAboveSoBelow

    SOLVED GMS 2.3 Change sprite with press of Space

    So I want my sprite to basically "transform" into a different one after pressing space bar, I have set up my sprite index and defined the sprites. I am super new to this and not the brightest to GML or a lot of coding. Thanks in advance! -ABSB /////////////////////////Player Movement and...
  6. S

    Beginner collision problem

    Hello, I have created a collision tile map, but the code below had a weird quirk where the player object will jump through a barrier to the right or repeatedly skip backwards when colliding to the left. This only happens when the barrier is placed in particular spots in the room. The issue I...
  7. S

    GMS 2.3+ My first open world: How do I draw tiles outside a room?

    Hello wonderful people! I've decided I want to try making my 16bit Top Down 2.5D game infinitely open world, to see how possible it is. I understand there will be complications and world gen will require constant manipulation, but I wanted to see if I can cope with it, and just how possible it...
  8. xDGameStudios

    Asset - Scripts [CAMERA] xCamera is a task based camera asset (FREE)

    [LINKS] xCamera (marketplace) xCamera (itch.io) [DEMO GIF] [INFORMATION] This is a task based & modular 2D Camera controlling asset pack for GMS2.3+. [SETUP] In order to use the camera system first you need to setup the view/camera as normal in the IDE using the room settings (or through...
  9. xDGameStudios

    GMS 2.3+ [TEXT TUTORIAL] Keyword "static" Explained (Part 2 : Execution Order)

    GM Version: Studio 2.3+ Target Platform: Windows / All Download: n/a Links: n/a [PROBLEM] Today we will be talking about static variables initialization order... now you might ask: [EXPLANATION] So static keyword again! If you don't know what it is you should first take a look at my first...
  10. S

    SOLVED I can't seem to be able to remove part of a surface...

    gpu_set_blendmode(bm_subtract); if room == rm_village { draw_rectangle_color(3434,3520,3551,3567,c_white,c_white,c_white,c_white,0); } Hello. I'm drawing to a surface (ingame water reflection) which reflects instances onto the surface. There's certain pixels I don't want to be reflective...
  11. Evan Kinsler

    GMS 2.3+ How to execute code you'd find in a Draw_GUI event in a collision event?

    The title pretty much speaks for itself. The following code is from a Draw_GUI event. testText = "* There is a splatter of blood on the ground."; draw_sprite(spr_dialogue_box_REG, 0, 31, 320); draw_text(60, 342, string_wrap(testText, 500)); draw_set_font(dtm_mono); The following code draws a...
  12. Evan Kinsler

    GMS 2.3+ How can I change the SPACING of wrapped text in a draw GUI event?

    So I was on the Gamemaker Discord with the support of a user named 'tfg' and a tutorial by FriendlyCosmonaut on YouTube, I am in the process of making a textbox mechanism similar to UNDERTALE's. It draws the textbox itself, it draws the text, along with its desired font, and it even wraps the...
  13. S

    GMS 2.3+ Is there a way to remove vertex_position_3d() from a buffer?

    I'm using vertex buffers to draw grass sprites around the room, and I want to be able to remove triangle positions for specific grass sprites, effectively removing specific grass sprites form the room. This data is held in a "vertex_buffer" so I'm trying to find a way around removing vertex...
  14. S

    SOLVED Way to use Variables(Strings) in Struct Pathing?

    Hello All, I am hoping this to be a very easy question that I may have overlooked in the manual, but I can't seem to find the answer. The title may be a little confusing so let me break it down. Lets say I create this struct: var stats = { stat0 : 23 stat1 : 24 } Keeping it basic...
  15. S

    GMS 2.3+ Game slowing down when moving around the room, slowly returns to normal after staying still

    Hello guys, I'll try to explain my scenario. I've been working on a game with a room that's 4000 by 4000. I don't know if that room size is overkill or not but I guess I'm trying to see what limits I can push with my game. I modified an asset that fills the room with grass vertex buffers...
  16. Evan Kinsler

    GML How do you reference the next room in the Room Manager's room order?

    The term pretty much explains itself. In this example, how would you reference rLevel3 in an alternate way than naming the room later on in programming? Consistantly naming and naming and naming rooms will waste valuable time in my perspective.
  17. Hieran_Del8

    GMS 2.3+ [Solved] Can extensions written in GML return GML struct's?

    Let's say I have a struct defined in GML as: function special_compiler(expression) constructor { compilerError = undefined; ... static run = function(params) {...} static compile = function(expression) {...} if (!is_undefined(expression) && expression != "")...
  18. S

    SOLVED Can shaders affect an instance's x and y? (instance_place and instance_destroy not working)

    Solution is in my final response to this thread. I''m working with this Wind Grass shader: https://marketplace.yoyogames.com/assets/6030/depth-based-grass-with-wind GMS2.3.1 I had another thread about this asset although this time a different issue. It seem the x and y of each instance...
  19. William Garrison

    GMS 2.3+ 9slice not working quite right?

    Im sure it's not exactly 9 slice that is the issue but something in my equation or setup that is causing the issue. Problem is I have stared at this for so long I cant see whats wrong. Okay so the issue... The 9slice is drawing exactly as it should....sort of. It draws the box right is the box...
  20. Z

    SOLVED Multiple Jumping Animations

    Hello there fellow programmers, I have a problem concerning the code that affects the jumping animation of my player in a 2D Platformer. What I want to happen is when the jump button is pressed and the player is on ground I want spr_Player_Jump to play once. Then when the player is the air...
Top