Questions tagged [game-maker-language]

General Game Maker Language (GML) support. The programming language used in Game Maker and Game Maker: Studio.

125 questions
0
votes
1 answer

In Gamemaker Studio 2 how can I find out in code whether the platform is HTML5 or not?

I want to be able to run or not run code depending on which platform I am building for. Some code should only run for the HTML5 platform. How can I found out whether the platform being run is HTML5 inside my gamemaker events?
Jaswir
  • 172
  • 11
0
votes
2 answers

instance_create_layer won't recognize a layer that IS created

I'm using Gamemaker studio 2 and I am fairly new keep in mind but I am fairly certain this isn't a problem on my side. I've been watching a youtube series on creating my first game using GML and my code looks EXACTLY like his and is not working. if…
Trevn Jones
  • 341
  • 2
  • 4
  • 11
0
votes
2 answers

Game Maker Language sleep function without using alarms

There is no built in sleep function in gml, is there a way to do a sleep function without using alarms?
0
votes
1 answer

How do you do negative random number (gamemaker studio)?

Can you use irandom(-10,10) to generate negative numbers? Or does this function provides only number >=0? There is no information in documentation of GML.
not_loqan
  • 91
  • 1
  • 1
  • 9
0
votes
1 answer

Game Maker Language: place_meeting doesn't seem to work

I'm making a Pac-Man-like game and I wanted to recreate the Pac-Man maze, but I wanted to make it easier for myself, so that when I change the wall placement it would automatically change the way the wall looks. My pac-man sprite as well as my wall…
Vesk
  • 138
  • 3
  • 13
0
votes
0 answers

How to sense which direction my player object was hit from in Game Maker Studio 2

I'm making a 2D Platformer game in GMS 2 and I need to make my player face the direction that he was hit from when he dies. How do I sense which side he was hit from? I only need to sense right and left collision. Currently my code looks like…
user8116739
0
votes
2 answers

Game Maker Studio Score, My Score resets when going to the next room

I'm having a problem regarding the scores in my game, My game is about answering questions using jumbled letters and when the player gets one correct answer, the game should add +1 to the game score and move to the next level (which is in the next…
0
votes
1 answer

Custom high score system not writing to ini properly

here's my full code for displaying a custom high score system: // instance vars var buffer = 0 var trigger = 0 // display setup draw_set_font(fnt_highscores) draw_set_color(c_white) draw_set_halign(fa_left) draw_set_valign(fa_middle) // open…
0
votes
1 answer

in android extension for GAMEMAKER STUDIO cant find argfree method on extension class

I am working on making a text to speech android extension for gamemaker studio, I'm getting this error: 05-01 17:16:41.304 16939 17013 I yoyo : Can't find argfree method on extension class:getMic [] when trying to use my extension in-game. the…
Wraithious
  • 385
  • 2
  • 11
0
votes
1 answer

Storing multiple unique arrays in a gml data structure

Imagine you are trying to create a data structure that will hold all of the data on all of the gear that can possibly be equipped in an RPG. In this case one piece of gear can be represented by four values: a fixed-length array of length C, a…
0
votes
3 answers

How to convert string to binary representation in game maker?

I found a script that converts binary to string but how can I input a string and get the binary representation? so say I put in "P" I want it to output 01010000 as a string. I have this but it is not what I am trying to do - it converts a string…
BigDuke6
  • 117
  • 1
  • 13
0
votes
1 answer

game maker studio transferring multiple variables to a script

var am = random_range(2,9) Blood(dir,am); for (i = 0; i < am; i ++) { bl = instance_create(x,y,Obj_Blood); bl.dir = dir } When the script is run, I want to transfer multiple variables across from the object to the script. It works if I…
0
votes
1 answer

Game Maker JS Extension

Hi I'm looking to add javascript functions to game maker, but the format of them is like this: companyname.initialize({ soundMuteCallback: muteSound, // optional soundUnmuteCallback: unmuteSound // optional }); And in the…
-1
votes
1 answer

Best way to implement a dialogue system in Game Maker Studio 2

I am trying to implement a dialogue system for a game that I am making. I have the actual system for handling the text and input all set up. My question is asking about how you actually show the text and have it formatted properly in a certain…
-1
votes
1 answer

A problem with button commands and direction arrays

I currently have a big question for writing code for button commands and direction arrays. I write code for a horizontal button array that is in the form of something like this: for (var i = 0; i < array_length_1d(left); i ++;){ if…
1 2 3
8
9