• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

gml 2

  1. M

    GameMaker Alpha issues with gpu_set_blendmode_sepalpha?

    Alright can someone tell me what I am missing here? I have a surface being draw to the application surface. The surface being drawn is cleared black with a .5 alpha. If I draw this surface without blend modes the black region looks as it should. Basically it darkens the screen a little. Now...
  2. Divinik

    GameMaker [SOLVED] Keep Sprite in Same Position Relative to Obj Scale?

    So I have a simple scale calculator used for scaling active actors relative to their horizontal position on the screen during the battle sequences of the game. The code for that is: battleScale = (distance_to_point(x, camera_get_view_y(camera)))*0.0025; image_xscale =...
  3. T

    GML Player Instance Destroyed When Switching States

    I've been handling my player's different attacks with a state machine, but I've encountered a recurring issue where if the player initiates an attack in midair at a certain close distance from the ground, the player object is destroyed and their hurtbox is left behind and it's occurring before a...
  4. E

    GameMaker [Solved] Saving/loading base64 encoding trouble

    Hello fellow game makers! I'm using the base64 encoding in my saving/loading. But have run into an issue regarding loading info that an existing save file doesn't have. Like a variable that checks if an item is unlocked for a new item I added to the game. I have checked both the manual and the...
  5. J

    Connecting a game to Prestashop

    Has anyone ever connected a game to a prestashop site? I dont mean selling the game on prestashop. I mean making products in the game one could export to prestashop and purchase? Basically an overlayed 2d layers like maybe a character maker. each layer selection changes price of the product...
  6. I

    GML Im trying to make a server but the switch statement does not catch any of the 4 possible values.

    var type = ds_map_read(async_load, "type"); switch(type) { case network_type_connect: show_debug_message("Connected"); break; case network_type_disconnect: show_debug_message("Disconnected"); break; case...
  7. S

    GameMaker [SOLVED] Tile Collision system snaps x to a grid when jump button is pressed

    Hi there! recently I picked up an old project (a remake of the old platformer game called Crystal Caves) and started changing over all object based collision to a tile based collision system. my starting point was Shaun Spaldings tutorial and the YoYo games platformer tutorial. the problem...
  8. A

    Double jump

    so i’m really new to GML well coding in general like i mean 3 days into it and i can’t figure out how to add double jump can someone give me a code for it and maybe explain it or just post it in the reply’s either is fine thank you.
  9. M

    GameMaker 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...
  10. 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...
  11. Z

    GameMaker 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...
  12. J

    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...
  13. 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...
  14. S

    GameMaker 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)...
  15. 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...
  16. A

    "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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top