gml

  1. KingRegicon

    Simple Viewport Setup- Can I Toggle Tall and Wide?

    Hello, everyone! I have been practicing GML for a few weeks now, and I'm really loving the problem-solving aspect of programming. The manual, online tutorials and GML forum posts have helped me through every problem I've faced so far, but now I must write my own post in desperation. The Setup...
  2. Selafio_Carcayu

    GMS 2.3+ Returning to GMS

    Hello everyone. So I started in GMS when it first came out, and it took me for ever to understand even the most basic concepts, I honestly don't have the logical skills to code. And just when I had some understanding, thanks to Shaun Spaulding and Heartbeast, GMS 2 was launched, so I rage...
  3. ohdudehelpme

    GMS 2 How to make a shrinking red zone (Battle royale type)

    Hello, I'm a little new on this forum I have recently moved from GM8 to GMS2 I want to know if there's a way to make a shrinking red zone and its safe zone which can hurt the player if its outside the safe zone, can please someone help me?
  4. netoxinaa

    SOLVED Image index toggle

    Hello, I have this Flame object with of course a Flame sprite which I want first to start animating. Then when it reaches to the last frame, I want the object to toggle between the last 2 frames for some seconds. I have the following code in the step event, but it seems like it never enters into...
  5. U

    GML Character button operation

    Good evening. I'm Japanese so I use Google Translate. For some reason, you have to change the character from keyboard operation to on-screen button operation. I used the keyboard to move and change the sprite, but I have to display the move button on the screen to make it for the sootphone. I...
  6. netoxinaa

    Vertical Object Collision

    Hello, I'm building basic platformer mechanics and I want to implement object collision but I'm having a problem. This is the code I wrote (just for vertical collision): if (vSpeed > 0) bbox_side = bbox_bottom; else bbox_side = bbox_top; if (place_meeting(bbox_left, bbox_side + vSpeedFinal...
  7. U

    SOLVED The character disappears.

    Character disappears when no keyboard is pressed This is the only code for that player. thanks! --o_player1.step-- left = (keyboard_check(vk_left)); right = (keyboard_check(vk_right)); up = (keyboard_check(vk_up)); down = (keyboard_check(vk_down)); hspeed = (right - left); vspeed = (down -...
  8. TheOnlyWRT

    Rotate a sprite without rotating its collision mask

    Hello! So I am working on a platformer where the player can roll. I have been coding the rolling motion by moving at a certain speed over a given distance and rotating the sprite using image_angle. However, with gravity, the player gets stuck in the floor. I realized that this is because using...
  9. U

    SOLVED Code for keyboard movement

    Hello. I am now writing code to move the character with the keyboard. The code below I wrote is flawed. For example, if you press the left key while holding down the up key, and then release your finger from the up key, you will continue to move to the upper left even though you have only...
  10. Gorshalox

    GMS 2 Jump Animation

    So I'm making 2d platformer and I don't know how to make correct the animation of jump, in my case the player jump and the animation is playing very fast and ends in air, I will post the my animation code in Step Event below //Animation //===Walk if (key_right) { sprite_index =...
  11. witches

    SOLVED Dynamic Outline Shader from Surface

    Hey all. So I'm working on an outline method where I sample a surface texture of a couple of sprites and send that through a basic outline shader and basically clear and repeat. So far it works well, but there's a tiny outline of my sprites being created even when they're both being drawn onto...
  12. Queble

    2D Tile Collision help

    So I'm making a game where the player needs to collide with walls and stuff, right? I watched every tutorial online, but there are none that show what i want (a player that can collide with tiles using his bounding box) So I came up with this code, and the X dimension collisions work most of...
  13. A

    Windows File IO breaks after compilation

    Hi, I'm Atell. I've been familiar with GMS2 for a long time, however, this is the first one I need to actually create an executable for my project. And I've faced a problem. It runs fine when I test it in the virtual environment, I see config files being created and loaded, various logs I've...
  14. L

    SOLVED Need help with a physics based cannon game

    I want to make a game where a physics object is launched from a cannon at different speed and powers, the problem is getting the object to launch out at the angle of the cannon but the function physics_apply_impulse() is based on having an x force and a y force not a power and an angle... so my...
  15. U

    SOLVED About volume attenuation of audio_emitter

    Hello. I want to make the sound of the clock smaller as the player gets farther away. Even if falloff is set, the sound of the clock does not change at a certain volume. Is there any setting mistake? clock create ClockEmitter =audio_emitter_create(); audio_emitter_position(ClockEmitter,x,y,0)...
  16. I

    GMS 2 How to recreate a depth value.

    I hope this is the right forum for this. I have some familiarity with GMS1 from my youth so I bought GMS2. With my main aspirations being the creation of a psudo3D game which utilized the depth feature in the Drag&Drop. I have seen some murmurings of a way to use a depth function within the...
  17. JeanSwamp

    Vertical Parallax Scroll Desperate help

    Hello, I am having issues trying to make my vertical parallax look good and I am looking for ideas and suggestions. Obviously scrolling a vertical parallax with layer_y(layerid, camera_object.x *0.5) and stuff like that won't work for big rooms. I currently use this: var _ypos =...
  18. V

    Legacy GM Snapping to grid after panning with view enabled

    Hello, After a long time I wanted to start Game Maker programming again. However, currently, I have a problem with combining view, panning and drag & drop in GML. The project can be found here. When you start it, you will see some buttons on the right. Without panning, it is possible to drag...
  19. Jaysin

    SOLVED Need help confirming a possible bug

    Hi, I'm Jaysin, I've been using GMS2 (IDE: 2.2.5.481 /// Runtime: 2.2.5.378) for the past few weeks after having initially tried it 2 years ago. I enjoy it a lot, but I've come across an issue that I'm concerned may be a bug. I'm getting a crash in the GMS2 Runner and when I build a Windows...
  20. L

    image_xscale not working for jump-through platform

    I have this line that should change the xscale of the object: if (hsp != 0) image_xscale = sign(hsp); When I use it, nothing happens. So after shifting the location of the code in Step, everything remained the same. Eventually I just wanted to try out how image_xscale works so I put in this...
Top