gml 2

  1. M

    GMS 2 Tactics screen with waypoints for a manager game.

    I'm creating a manager game where a part of the game will focus around the creation of tactics using a waypoint system for the "players" you control. I've successfully experimented with making the "player" move from their starting position to a set of coordinates by letting them create their own...
  2. D

    GML A question about movement

    I was wondering about the different ways to do player movement in GML, many of the Game Maker tutorials from YoYo like breakthrough or space rocks have you use the key down event while on forums people say to use keyboard_check(ord()) instead so I'm curious if there are differences about the...
  3. Z

    GMS 2 State machiens small problem

    I'm sure this is a quick fix, but I have been up all night trying to find a solution for this aggravating problem. Okay so basically, I want to have the player stop moving completely while in the attack state"(ATTACK_HAMMER)", if he is not grounded, i have a script i can call to check if he is...
  4. jtmx

    3D 3D Camera Yaw, Pitch, Roll

    Hello all, I'm trying to create a 3D Camera in GMS2 that has Yaw, Pitch and Roll. I managed to get the Yaw and Pitch working however I can't seem to get the Roll working properly. Any help with this would be greatly appreciated. Code: if keyboard_check(ord("A")) cam_yaw -= 10; if...
  5. xDGameStudios

    Discussion Renaming functions "string" -> "to_string" and "string_format" -> "to_string_format"""

    Right now there are a couple of function naming conventions that are not working for me (wanted to read what you guys think on the matter). string(number) takes a number and converts it to a string. Even though it seems logical to have the function be named "string" I do think the best option...
  6. S

    GMS 2 Reading off an ini file

    Can someone help me with this? I am getting a problem where I am trying to save controls to an ini file and load them back in so I can have custom control schemes. This is what I have so far: //Set up player controls lists var buttonTotal = 12; global.controlList = array_create(4)...
  7. S

    NPC Following Help

    Currently, I'm trying to have an NPC follow my current player character but am having difficulty implementing it. My code seems sound, but when I test it, the NPC simply stands still (but responds to other actions, such as implementing the text bubble that appears above their head). This code...
  8. Adam Mansour

    "Blink-Transition" Issue! Please help :(

    I am following a Tutorial series of Shaun Spalding. In the 7th part of his series he explains transitions and I coded it exactly like he did, but for me its not the entire screen. I made an Object for transitions. in the following Spoilers I paste the code exactly how I wrote it. Here...
  9. R

    Use sprite to cut through Tile Layer

    Hi all, my first post ever and I looked through the entire manual and forum but can't seem to find what I'm after. I have a tile map and tile Layer (see image attached). I want to be able to draw a sprite (just alpha) to cut an alpha hole into the tile layer. There could be more than just one...
  10. S

    GML Persistent object not updating after room_goto()

    I have an object marked as persistent that manages transitions between the main menu and gameplay in my fighting game. When the player selects a character and stage, I use room_goto() to change the room to the stage they select and then attempt to create an instance of the character they've...
  11. T

    Swapping control between player and AI

    I'm using GM2 and I want to allow the player to swap control between their current object and an AI-controlled one. Preferably when the player jumps on top of an NPC, the player swaps control to that new object while the AI behavior takes over the previous one. I'm not too familiar with GML so...
  12. T

    GML Help with go to another room

    Okay, so I have been following this tutorial on how to make a main menu for game maker studio 2. The problem I am having is the start button transition into another room. I already like the look of the menu and didn't want to change the code. I have already drawn out the button and since I'm...
  13. flyinian

    (solved)Help with keeping a contextual menu on screen

    I am trying to create a contextual menu and so, far so good besides the fact that I can't figure out how to keep the sub menu open(active?). Menu 1 > sub menu 1 > item 1 , item 2, and so forth. The sub menu is the list of item 1, item 2 and so forth. Mouse Hover on Menu 1 > Should open the sub...
  14. Evan Kinsler

    GML [SEND HELP] Problems in writing code for Button commands and Direction arrays.

    Now, I don't notice what is going on with this current code I am writing. The exact process I folloowed while writing this code is this: -- I create a room, sprite, and an object as a sprite to be used in said room. For the object, I create an event following the following code: left[0] =...
  15. L

    GML Producing text files for the viewer to read

    Hello, I'm working on a short experimental game using Game Maker Studio 2 on Windows! My goal is to have it create and write additional text files that are visible and accessible to the player in the game's folder at certain points throughout the game, however I am not sure how to go about this...
  16. Ramón

    GMS 2 Best way to create enemies attack patterns. Shoot em up

    Hello. I am using GameMaker Studio 2.2.1.375, and I am new programming games. I am programming using GML. In this moment I am creating a Shoot em up, and I have a doubt about the creation of enemies attack patterns. I can use Timelines, alarms... Do you know what is the best way to manage the...
  17. J

    GMS 2 If statement being ignored in collision event

    Hi guys, first post here, be gentle. I'm making a platformer where the two main mechanics are jumping and kicking. When you kick an enemy while it's in it's walk state, it goes flying away from you in an arc before colliding with the floor or a wall and destroying itself. When you jump on an...
  18. Cawful

    GMS 2 Pathfinding: travelling between diagonally adjacent forbidden zones

    Hi folks, any thoughts on the following problem are greatly appreciated! This post comes with the common caveat: noob at this, please be patient :) My aim: to get an instance to pathfind between diagonally adjacent corners of tile-based obstacles. The problem: with mp_grid forbidden zones (in...
  19. D

    GMS 2 Enemy collision crashing

    Whenever I my enemy object collides with my player object the game crashes with this error: ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object oEnemy...
  20. A

    Question - Code Decode GML file?

    My computer crashed while in GMS2 and now it only loads up some of an objects events, the rest are blank. I'm wondering if there is a way to read the GML file so I can copy the code out of it. Steve
Top