1. yukaccino

    GMS 2.3+ Hex-Grid Movement- Issues with Script

    Hello! I'm a newbie with GameMaker and my programming skills are really basic, so I've been following a four years old tutorial series I found- I want to make a Turn Based Strategy game, using a hex-grid to move and attack, pretty similar to Sid Meyer's Civilization. Tutorial I've found: I got...
  2. J

    GMS 2.3+ [SOLVED] Script portativiness - lost ? or i miss something ?

    Everything is in the panel. Feel free to give an astuce about. /* /// the string replacer project _ shared code + structure reconstitution // Hi there, i'm blocked into a bug ? i share my code for looking at it // and talk eventualy about code portativiness. :/ // To the follow, the shared code...
  3. A

    Collision script won't run

    Hey everyone, I'm trying to create a normal state so that I can switch between other states, but to do that I decided I needed to make a normal script which contains a script for player input and collisions. However, when I tried to make a script for the collision block of code I get this...
  4. Cofefe

    GMS 2.3+ Inputting Methods Into Scripts

    Hello forums! Long time no see. I have a quick question that I need answered, and I know somebody here can do it for me. The question is: Is it possible to input method variables into script functions? Here's an example of what I'm trying to do, but which doesn't work: // Step Event: Test =...
  5. F

    GMS 2.3+ Hard times with scripts...

    Hello there (and please forgive me for asking something in the wrong thread, if someone can fix that mistake), I hope everyone's doing great these days. I am currently following a Youtube tutorial (you can skip the first half part): Yes, this is the part 2 but I have no issue with the part...
  6. Osoy

    Question - IDE Code Formatting

    Hi, I have searched through keybindings looking for a key combination that would auto format code similar to CTRL+K + CTRL+D in Visual Studio. Is there such an option and if not is it on the road map for a future enhancement? Thanks.
  7. Epicrex

    GML How does the updated SCRIPT sytsem work?

    I was doing this thing from an older video and noticed that since then scripts have been reworked. How would I do this with the new(2 months old) script system?
  8. D

    SOLVED Text when creating a script

    When creating any new script, this text always appears. // Script assets have changed for v2.3.0 see // "yoyo link" for more information How to remove it so that it does not appear when creating a script? It's very annoying every time
  9. Kyrieru

    GMS 2.3+ Script changes in latest build?

    I'm getting errors in the latest build (that did not occur yesterday in the last 2.3 version). If I start the game with an empty room, an object throws an error saying that a script is referring to an object that doesn't exist. Did something about scripts change? For example if the script says...
  10. KakuniProject

    Please help, no able to create scripts

    Hello everyone, I'm quite new to game maker and into programming. I recently started a game and I'm on the first steps creating the collisions and movements, the collisions it was working fine when I inserted into step/Object, however now I tried to add into a script . I simply copied and pasted...
  11. UberhenriK

    SOLVED ds_grid_height argument 1 incorrect type (undefined) expecting a Number (YYGI32)

    Hello, I've created an inventory ds_grid for my game and a script that must get ds_grid as an argument, but it gives me an error: ds_grid_height argument 1 incorrect type (undefined) expecting a Number (YYGI32) at gml_GlobalScript_AddItem (line 18) - for (i = 0; i <...
  12. Arilyn

    Variable <unknown_object>.instance_create() not set before reading it.

    Hello, I'm pretty new to game maker but I've messed around with Unity a lot in the past. I've hit a roadblock and haven't been able to figure out why I'm getting errors despite researching and reading the documentation, but it's probably because I don't quite understand how GML and scripts...
  13. DevilKap

    SOLVED ScriptExecuteArray new errors?

    /// @function ScriptExecuteArray(_func, _args); /// @returns any /// @param {function} _func The function to run /// @param {arguments} _args[] The arguments needed function ScriptExecuteArray(_func, _args) { var _func = argument0; var _args = argument1; switch...
  14. G

    what's wrong with my daily reward system?

    hello everyone!! so, i tried to make a daily reward system where if the gets 1000000 points daily once a day when the game starts and notice the day changed here is my code in load game script: function scr_loadgame(){ if (file_exists("User.sav")) { ini_open("User.sav") =...
  15. Epicrex

    Windows Script suggestions don't work.

    The red bar at the bottom should say "ScreenShake(Magnitude,Frames)" as a suggestion. I closed and reopend the script and GML, but that didn't help.
  16. W

    Can't assign a return to a variable

    I made (borrowed) a script for drawing buttons to gui and it works perfectly, except I cannot seem to assign a variable to the returned value. Here is the script: /// @function draw_gui_button_sprite(sprite, index, x, y, width, height, main_view); /// @param {index} sprite The sprite to...
  17. erayzesen

    Simple Raycast Script

    Hi all. I released a raycast code to use your any projects; Note: It support Game Maker Studio v2.3 and new versions; Check it out: (with online demo): The method; var...
  18. FrostyCat

    GMS 2.3+ IMPORTANT!!! GM 2.3 Users Please Read! Improper script usage generates undefined variable errors

    Symptoms to Look For Expand for screenshot: The error is in the Create Event for object <undefined>. The subject is <unknown object> with a variable name that's either built-in or known to be already declared. The stack trace shows the source as something starting with gml_GlobalScript. For...
  19. O

    Enemies are not working

    I'm watching Heartbeast's tutorial on eme,y states and I type in the code he typed, but the game keeps crashing every time I get near an enemy Code for the enemy wander state ///scr_enemy_wander_state() scr_check_for_player(); phy_position_x += sign(targetx - x) * spd; phy_position_y +=...
  20. W

    Can I draw_sprite from a script?

    Can I draw a sprite from within a script? I can't seem to get it to work. I know the script is running because I can get the messagebox to pop up. e.g ///@description Makes sprite hover on cursor for placement ///@arg sprite var sprite = argument0; var xx = mouse_x; var yy = mouse_y...