gml

  1. A

    Help with running paths & timelines

    Hi, I imported a game made from GM Studio 1.4 into GM Studio 2.0, and learning GM 2.0. (FYI, I don't know much about GML) However, the conversion doesn't seem successful. In my game, with a mouse click, it was supposed to run action_path(), action_sound() and action_timeline_set() at the same...
  2. xDGameStudios

    GML [TEXT TUTORIAL] object.variable vs global.variable vs globalvar/macro structs

    GM Version: All Target Platform: Windows / All Download: n/a Links: n/a [PROBLEM] What is the difference between object.variable, global.variable and what are globalvar macros? When should I use one of the other?! [EXPLANATION] The first thing that we need to understand is that we are trying...
  3. face

    GML Programming basics in 20 minutes. (cheat sheet)

    GM Version: Studio 2.3 Target Platform: Windows Download: see code below Links: n/a Summary: In this tread I will teach you the basics of programing with GML. Attention: Useful information will be available here but you will need to use this regularly to get decent at it. What not to expect...
  4. Tiamat

    GML Trouble with collision

    I was programming to make the character only move horizontally while in the air(thankfully got that to work), but the collision with the character and wall is extremely weird. Horizontally, the character floats from the platform a few pixels away, and as it approaches the wall vertically, the...
  5. Luquemeister

    SOLVED breakthrough mobile version problem

    Hello every one, these days I've been trying to replicate the breakthrough game from the tutorials but for mobile, the main problem that i encountered is that I don't know how to make the pad stay in the game area and dont dissapear, I'm trying to implement the gesture event: drag start...
  6. C

    Player Not Respawning Correctly - Space Rocks Tutorial

    SOLVED! Hello, I've been progressing through the Space Rocks tutorial in order to familiarize myself with inherent GameMaker functions. For those who may be unfamiliar with this tutorial game: The base game is about just creating a spaceship which tries to shoot and dodge asteroids while...
  7. C

    GML Basic For loop for displaying 2D array not working when # of columns do not equal # of rows

    Just started using GML and am somewhat new to coding. I wanted to try to make a game menu that changes the color of the option you want to select if you used the arrow keys. I cannot for the life of me figure out why my For loops only work if the columns and rows are the same value (a 3x3 matrix...
  8. J

    Some instances working, others not.

    Hello there, second post. I plan to be quite active on this forum as I'm also teaching my niece GML. I'm having trouble with my instances, I'm making a platform game with ladders similar to donkey kong, but only some of the instances are working. In order to do the collision detection I have a...
  9. Evan Kinsler

    Can someone help me with making a simple menu navigation?

    The heading is pretty self-explanatory. I need help with making a simple menu where I can press the arrow keys and hovering sprites to replace the regular sprites. All of the code I have put into the project, I understand easily. Other than what I already put in the project, I need help with...
  10. FrostyCat

    GML GML Joseki Series: for Block Recipe Cards

    GML Joseki Series: for Loop Recipe Cards GM Version: GMS 2.3+ Target Platform: All Download: N/A Links: N/A Summary: A quick reference for a range of common use cases for the for loop. Summary This guide documents a number of common for loop patterns, best practices, and novice mistakes as...
  11. Megamini009

    SOLVED HTML5 (camera_get_view_x) returns 0.

    Hey, I was just trying out a parralax background using lerp, which worked pretty well in the regular desktop test mode. So i tried it in HTML5 and it didnt move at all.. after checking the variables, I found that camera_get_view_x was returning "0" at all times in HTML5... strange. I used a...
  12. FoxyOfJungle

    SOLVED How to get many values from 3d array? (or multi?)

    Hello! First time trying to use 3D arrays, it may seem a little stupid but you learn by making mistakes. šŸ˜… I have this situation: array[0][spr_sprite][2] = "Text 1"; // [index] [sprite] [sprite_subimage] = "Text"; array[1][spr_sprite][3] = "Text 2"; array[2][spr_sprite][4] = "Text 3"...
  13. Divinik

    Team Request Let's make a game together!

    I've been in the process of making a top-down RPG for the past year and a half on and off, and now I finally have some time to really dedicate to the project. I'm looking for a pixel artist and another gml programmer who want to collaborate and make an awesome game. The base programming of the...
  14. T

    GMS 2.3+ How to make multiple Joystick?

    Hello everyone I follow this tutorial to make Virtual Joystick. but when i put two joysticks on room screen. I find it can't multiple touch, any idea how to solve it?? Thank you very much my step code: var move = device_mouse_check_button(0, mb_left); var fingerX = device_mouse_x(0); var...
  15. FoxyOfJungle

    SOLVED Scrollbar problem [Partially solved]

    I'm trying to make a simple scrollbar work, I managed to do the main thing, which is to move it. The scrollbar function returns a value between 0 and 1. What I want to do is move the Y of an area according to that 0 and 1. The video below shows what happens: The video is a bit long, but I...
  16. toothmosnter

    SOLVED mp_grid_path not being followed, object flies off or doesn't return to passive path

    I have an mp_grid setup that works during the aggro state just fine, but the passive state only works when I add && (path_index == -1) to the if (mp_grid_path(...)) statement. However, this causes the object to not return to its passive path once the aggro state is left. Without the &&...
  17. Vredniuka

    GMS 2.3+ Default from DND to GML?

    I started my project, unfortunately, in DND a while ago. But now I know enough code that I want everything in GML by default. In previous version of GM2 my instance Creation Code used to come up in GML by default, but now it's DnD and it's annoying to have ot use Execute Code tool to do some...
  18. toothmosnter

    GML (Duplicate Thread) State machine state change is storing key_press boolean and influencing movement

    Sorry if this has already been posted, I'm not sure if my thread got deleted or not due to the gifs of my game I included in it (external links). Essentially, I have a state machine that changes from playerStateFree (free movement) to playerStateHide (stationary). Whenever I press any movement...
  19. toothmosnter

    GML [KNOWN BUG -- MACOS COMMAND KEYS] State machine glitch - inputs from one state (stationary) repeating infinitely when returning to free state

    I have a state machine and the "playerStateHide" has some issue with executing that I can't seem to figure out. I know it has to do with calling playerStateFree at the end of the hide function, as when I remove that line of code and mapped playerStateFree to a keybind, the glitch did not occur...
  20. xDGameStudios

    GML [TEXT TUTORIAL] Hash Tables Explained - Structs vs Maps

    GM Version: Studio 2 Target Platform: Windows / All Download: n/a Links: n/a [FACTS] Hash tables are "constant time" but they are constantly slower than arrays (by "very" little). Both ds_maps and structs are hash tables, so they store data as [key: value] pairs. [HASH TABLE] An hash table is...
Top