• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

gml

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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"...
  8. 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...
  9. 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...
  10. 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...
  11. 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 &&...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. xDGameStudios

    GML [TEXT TUTORIAL] Array Accessor Explained (@)

    GM Version: Studio 2 Target Platform: Windows / All Download: n/a Links: n/a [PROBLEM] When you create a reference of an array and edit it your original array stays the same and only the "copy" gets modified. [EXPLANATION] There are four different array behaviour you need to understand...
  17. KamilSeven

    Design Text Based Level Generation (Downwell, Spelunky)

    Hi everyone! In this video I linked, Ojiro Fumoto talking about a text-based random level generation and I was wondering if there are any sources to learn this technique in specific. Any article, tutorial, or contribution to the topic would be really helpful. 33:54 Fumoto starts to talk on the...
  18. FoxyOfJungle

    GMS 2.3+ Scrollbar problem

    I've been trying to understand how to make a scrollbar for a few hours, I managed to make it work by dragging with the mouse, but there is a problem, a part is left out: My goal is to return a value between 0 and 1. I did it, but it goes over the limit, and no, it’s not just subtracting the...
  19. samspade

    GMS 2.3+ What are the significant changes to GML with 2.3.1?

    With the advent of 2.3.1 it's time for another update to a series I had almost finished (two videos left, one I already have to redo for 2.3.1). Here's my list of the significant changes to GML in 2.3.1: Arrays have a bunch of new functions You can now delete variables from structs structs have...
  20. M

    GMS 2.3+ Randomizing multiple instances of the same object - GML

    Hi everyone. I'm pretty new here but I have a question that I was unable to find anywhere. I am working on a multiplayer side-scroller roguelite, and I am having an issue randomizing rolls. I currently have two players I have created, and if they both swing their sword on the frame, they will...
Top