gml

  1. R

    [SOLVED]Character stuck to edge at launch - Collision

    Hi people, first time dipping into GML, following Shaun's 2020 tutorials. I strictly followed his instructions but my character starts stuck in a 1pixel wide corridor on the left edge of the window, only allowing me to move up and down. I place my object anywhere in the room, but always start in...
  2. S

    GML Trying to make code that swaps targeted character like in soccer games

    Hey I have set up my object(Oplayer) so it has all the player code with the idea being the other objects have ai code until they are targeted. It changes target when a invisible bullets collides with a viable object. the code currently makes the target Oplayer and not the collided object even if...
  3. thejosving

    GameMaker Is there a way to discover the exact point where the collision happened?

    As the title says, is there any way for me to find the point, in pixels, where one object "touched" the other?
  4. Ehsan

    Job Offer - Programmer Need a programmer (Budget 2000 USD + fixed price payment for prototyping)

    I'm looking for someone to develop my game when this is ready, with pay. For now I'm looking at prices, discussing an estimation, and creating a budget plan. The base mechanic is ready so far. It'll need a demo for a match-3 like game with a little brain teaser twist. I will provide the...
  5. J

    GML Scripting Buttons using Object Variable Definitions

    I have always created sprites with needed text for buttons, then creating an object for each button sprite. I found myself wanting to change the text on the buttons to make it more dynamic in GMS so I created the following set of sprites that represent a button in Disabled, Enabled, Hovering...
  6. A

    Inventory system help

    I'm not super experienced with programming, so I'm having trouble deciding how I want to make my inventory system. What I'm wondering is for an inventory system I want to have in my game, it seems logical for me to have the individual items in the inventory, say swords, spears, and bows, be...
  7. thejosving

    GameMaker rope with physics, or some kind of gravity.

    Hello! How are you? So I had an idea for a game that involves "chaining" two objects together. I already defined this mechanic, but now I'm having problems in one part: the rope connecting the two objects. I wanted to make a realistic rope, with a gravity system like this drawing I made: I've...
  8. M

    GML Pong game

    I have a pong game, but the paddle just moves forward, it can move up and down but it moves forward. This is the code: Create Event: speed = 5; Step Event: if (keyboard_check(vk_up) && y > 0) { y -= speed; } if (keyboard_check(vk_down) && y + sprite_height < room_height) { y += speed; }...
  9. Overlord90098

    GML Practise with state machines

    I'm currently practising using state machines to become more familiar with them. However, with my new test platformer, I don't know the collision code doesn't work (I took it from another 2D platformer it works there). player create code state = pl_states.idle; hsp = 0; vsp = 0; grv = 0.5...
  10. VoxPrincipalis

    GameMaker Pass by Value, or Reference?

    Buen Thursday Y'all šŸ¤  if I create a map, and fill it with arrays holding arrays and then access a value from the map, is the variable accessing the map value given information by reference, or value? ///Ex var cool_array = [1,2,3,4]; var cooler_array = [4,3,2,1]; var coolest_array =...
  11. G

    Help with image_angle being a point_direction based

    Hello. I'm trying to make my weapon look at the mouse position, but, it is acting weirdly wrong. the white line is what i've wanted to the angle to be the weapon position and direction is controlled by the player script heres the code: if weapon { var mb = mouse_check_button(mb_left)...
  12. I

    Instances

    I have two Objects 1- oStone and 2-oWallStone And under every oStone Object There is An oWallStone under it so that I can Collide with and don't walk through it. So what I want to do but can't is to destroy the oWallStone instance That's under the oStone that I picked up so how do I do something...
  13. I

    (Related To "Objects")

    In my game That i am making i have a room that has more than one instance of the same object "Rock". i want to have one object but duplicate it in the room. the problem is i have a code that makes it when i pick it up it destroys it self and other stuff happen and it works fine but the problem...
  14. VoxPrincipalis

    SOLVED Switch Case Range

    Buen Thursday Y'all šŸ¤  Does Game Maker support ranges in a switch case? Some C++ compilers do. Example: switch(ord(char)) { default: return -1; break; case 32: return 0; break; case 194: return 0; break; case 207: return 0; break; case 212: return 0; break; case 252...
  15. JesusOnExtasy

    GML My shop system ready [ +Project Download link ]

    Good afternoon everyone. I have now completed my store, where you can buy then put on and take off a piece of equipment. I think it will be useful for beginner game developers :) Leave a like if this information was helpful to you. I want to appeal to those who have been working in GMS2 for many...
  16. aidanthefurry

    GameMaker Camera Movment Bug

    I was making camera movement in gms2, which follows the player and pans toward the mouse. However, it would only pan up and down. Any help is much appreciated. (also this is my first time using any type of forum so if I did something wrong sorry about that) //CREATE// shake = 0; //CREATE...
  17. M

    SOLVED Help / 8 Direction Movement and facing by releasing the keys

    Hello, i haven't been programming for that long and somehow I can't find the solution to the following problem. I have a code that allows me to walk in eight directions. However, I can't get the character to look in that direction and the sprite to change in the same direction to idle when I...
  18. PlayLikePig

    GML Switch statement with multiple expressions [SOLVED]

    I am very new to GML, and the only language I've written in before this is c#. Now, in c# you can put multiple expressions(variables at the start) into a switch statement like this: switch ((bool1, bool2)) { case (true, true): break; case (true, false): break; case...
  19. The Major Squadron

    GML Footstep sound

    Hello, I'm working on a 2d platformer where a sound plays every time the player is at a certain fram of their animation. The sound however doesn't work properly and I can't figure out what the issue is. if((sprite_index == sprPlayerRun) and (floor(image_index) == 3 or floor(image_index) == 9)...
  20. E

    GML Clamp Numbers?

    Hey i was wondering how to clamp numbers for example between -50 to 50 but it always be integer not real so if i modified it to like 20.5 it will return to 21 so how? i also tried to do that something = clamp(something, round(-50), round(50)); idk if that right!
Top