gml

  1. W

    Destroying a specific instance

    Back for more help. I'm trying to destroy a specific instance, here's the info; There could be many instances of an object. I want to click on one of the objects to bring up a menu. If you click on a destroy button on that menu, you would destroy the instance of the object that was...
  2. B

    GMS 2.3+ Weird Sprite Spawns

    Random Sprites Spawn during my game like those gradients and the main character space ships i have no clue how to fix this, Evan when searched the sprites are used in any code, just background use only.
  3. B

    GML Resetting Score

    When my game sends you back to start menu the score stays the same flying thought levels. What command do i reset it with?
  4. Papa Doge

    SOLVED Simple light effect

    I'm attempting to add a simple light effect to my game where certain objects have a light radius around them when the world is dark. I have the surface drawing correctly with the dark overlay but my light punch outs don't seem to be working. I've create an object called obj_lighting_render to...
  5. kpenrose92

    why is tilemap_get_at_pixel returning different values for same tile index?

    Hello. Tiles in my room with index 1 return 1 when i call tilemap_get_at_pixel at their location, but some of tiles with the same index return 1073741825. Can anyone explain this to me?
  6. MoonShroom

    Calling another struct within a struct constructor

    Hi all, I am currently trying to initialize a struct inside of a struct constructor, like so: /// @function Rectangle(X, Y, Width, Height) /// @param {real} X /// @param {real} Y /// @param {real} Width /// @param {real} Height /// @desc Stores a set of four reals that represent the location...
  7. E

    GMS 2.3+ Mp Not Moving

    I have a controller obj that creates a grid: and a "Zombie" that creates a path and follows it along the grid: I don't know why, but my zombies will not move toward the oTarget.
  8. S

    GML Calculating a non-axis aligned bounce/reflection vector for collision resolution

    Non-axis aligned 2D reflection vector GM Version: 2.3 (demo is for 2.3 but the concept would work in any version) Target Platform: All Download: A link to the freely available source code and project is available here: Links: Tutorial Video and Github link Summary This video tutorial builds...
  9. KyleRansford

    GMS 2.3+ Getting: FAILED: Run Program Complete on a Project that worked on Earlier Versions

    I've installed GMS2 2.3.0 on another PC and on a project that does work in the previous version on GMS2, I keep getting the "FAILED: Run Program Complete" message. I look through the log and don't see anything that looks like an error message relating to code, but I see this long line that I...
  10. S

    GML How i can create and save a variable for every Instances of an objects in one room?

    Hello all. I were thinking about creating and saving (in hdd or etc) a variable for every instance of an object in one room. i have thought about using of id or instance_id but i couldn't make it working. So how i can create and save a variable for every Instances of an objects in one room? For...
  11. V

    GML Find precise collision point on specific fixture

    I created an instanza that contains 3 different fixtures (GM's integrated physics is enabled). In the collision event with an "obj_Wall", how can I check with which fixture collide, and get the collision coordinates with the specific fixture?
  12. V

    GMS 2.3+ GM Physics problem

    I am trying for the first time to use GM's integrated physics (I use version 2.3). I wanted to create a simple pogo stick. I created 2 objects: - One representing the stick, to which I assigned a "Restituition" = 0. This way I set the stick not to bounce if it collides with the terrain. - A...
  13. Armored Dragon

    Thrown object to stop in the air?

    Right now i'm trying to create an enemy that throws a stone orb at player's direction and then walk to the orb on the ground to recover it. The problem is that i can't find a way for this orb to lose speed and eventually stops. This is the code that the enemy uses to throw the orb...
  14. P

    GML Correctly loading rooms from a save file

    So I am new to Game Maker Studio 2 and have had little experience with coding I was using ds_maps and ds_lists to save the information of my game but whenever I save the room data then go to a different room and load the save the character object spawns on the right of the screen. He will always...
  15. S

    SOLVED Any way to get sound length?

    Is there any way to get the length of a sound, perhaps measured in steps? I don't see any existing scripts that do that
  16. TheCheeseMaster

    GMS 2 [Solved] Trying to obscure lights in a top-down game (i.e. lights that appear to have depth)

    Hi everyone, I'm working on a top down perspective game that has a day/night cycle. I've got some lights in the game, and am using the blendmode bm_add when drawing them on the night sky surface (night_cycle_surf). After the lights are drawn, the surface is drawn over the player's view and all...
  17. U

    SOLVED Distorted screen on actual machine

    Hello. I'm Japanese so I rely on Google translation. sorry. When I started the game made with EXPERIA5, the left side of the screen was distorted, and the right side of the screen had some objects visible. It is said that android puts garbage on the data outside the description, and it seems...
  18. kureoni

    spacing between damage area spawning - help me

    I'm programming a boss that spawns areas of damage across the map, but right now some areas spawn in the same place or too close to each other, thats the code for the spawning in an alarm event, it uses random ranges to define the y and x of the damage areas, of course that there is nothing in...
  19. K

    SOLVED Player spawning to wrong x,y position upon loading

    This is my first forum post here, so if I neglect to put any important code please tell me and I'll try to include what's needed. I'm working in GameMaker v1.4.1804. I've followed Shaun Spalding's JSON based save/load tutorials and I'm run into a problem. Whenever I load my game, when I go to...
  20. U

    SOLVED Move the room as an argument

    Hello. I want to place an advertisement when moving from room 2 to room 0, so I want to use the if statement as an argument to move from room 2 to room 0. How should I write?
Top