• 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!

coding help

  1. G

    GML Problems in reading INI files

    Hello, I created a code in which, when an object collides with another object (obj_X) and you press spacebar something happens. Here is the code: My problem is that it will always send me to the room "Menu" even when in the ini file it says 1. What is happening??! Thank you so much
  2. M

    i need coding help

    i need an piece of code wich makes "monster" ignore and dont touch the "engerd" and still grab the "appel" and the "gouden appel"
  3. P

    How to create a timer?

    So I'm making a game for my friends and I, who love speedrunning, and so I want to implement a super-precise timer. How would I go about doing so? Is there a built-in function for timers? If what I want isn't clear, I want something that would begin counting up when a room begins, and that I...
  4. D

    Variable not set?

    Ok so I am making a simple rpg so far I have two enemies and I'm trying to make them scale to the player level but also giving them their own scaling values so one is harder than the other they pretty much have the same exact code except one doesn't have image transitions and the other does so I...
  5. H

    GML How to make text boxes? Looked everywhere!

    Basically, after I searched literally everywhere on the internet, I couldn't find one text box engine that could work well with my game. I tried a few youtuber's engines, but none of them could do the following: - Stay in a box - Stay a certain size - Appear on the bottom if you are on the top...
  6. A

    GML HELP (Attack Patterns in bullet hell)

    I am making a bullet hell space shooter and need help with setting up the attack patterns. Here is an image of what I want to do: For Pattern 1 I wanted the Enemy to fire 3 projectile bursts every 5 seconds (alarm is set to 5), also the enemy is supposed to take aim at the player constantly...
  7. A

    GML Malformed If Statement[SOLVED]

    Like the Title says, its a malformed If Statement (I just don't know what exactly is wrong). ///Fire when Ready if(phase3 = true) { //Says that this line is the issue. if(flip = false); { var int = instance_create(x,y,obj_ball_laser_2); var int2 =...
  8. A

    GML Attack Phases/Player Distance [SOLVED]

    I have an enemy that will use different patterns of attack depending on how close the player is to said enemy. however I am not sure how to use the && symbol when trying to make additional conditions in an if statement in regards to the distance of the player. Here is a sample of my code: if...
  9. A

    GML Instance Create Moving [SOLVED]

    I am looking for the GML equivalent of the Instance Create Moving Drag n' Drop action block. I tried searching the manual and guessing at it to no avail.
  10. A

    GML Wandering Enemy [SOLVED]

    I have been working on an enemy type that will wander around and when the player is within range; begin to fire projectiles at the player. For the movement I've been trying to get the enemy to pick a random direction, move a certain distance, stop and then return to their starting point. I know...
  11. A

    GML Enemy Reverse

    I am trying to figure out how to make an enemy make a complete 180 when they collide with another object. I tried just having the enemy bounce but they just get stuck. Edit: I have no idea how to make the enemy reverse. I don't how to do this. Switching left or right in my mind is doing the...
  12. A

    GML Enemy Clusters/Swarms[SOLVED]

    I have been attempting to make an enemy type that is small and clusters together when spawned. Once you have taken enough of them down they will scatter in random directions. Also this enemy is meant to be passive until it takes a small amount of damage, upon which they will pursue the player...
  13. W

    Floating Ghost Enemies - Programming Help

    Hello, I'm currently working on a Ghostbusters inspired side scroller for my course and I'm having trouble creating enemies for the game. My idea was to have regular ghosts as enemies that would float around when idle, then chase the player upon them getting close to the ghosts. I've been...
  14. G

    GML Camera Issues

    Hello there everybody. I am brand new to GameMaker and this is my first post. I am trying to code a particular 2D top-down camera that I can best relate to function with the Hotline Miami camera. However, there is a key difference that I am trying to implement but have been unsuccessful...
  15. L

    I'm having trouble getting the enemy to shoot the player

    I have a script set up so the enemies follow the player when they get close enough I can't figure out a code I can setup in the follow script to make the enemy fire at the player without them spraying just a line of bullets while the player is close
  16. A

    GML [HELP] keyboard_check() Trouble

    Hello, I was coding a piece of script which would enable the idle animation (frames 0 to 39) when none of the keys used in moving (A, D, W) were pressed, and enable the running animation (from frames 40 up) when one of the movement keys was pressed. The code looks like this: image_speed = 1; if...
  17. C

    Windows Title Screen Error

    I tried running my game's title screen after fixing a common error and when I launched it this code error box appeared. The code error said: ___________________________________________ ############################################################################################ FATAL ERROR in...
  18. H

    Legacy GM What is wrong!!!

    so i made part of my game and added in a FogOfWar effect everything worked normal until i went to room one and changed around a few tiles and now i get the error message FATAL ERROR in action number 1 of Step Event0 for object obj_view...
  19. D

    Legacy GM shooting code help

    hello can somebody help me please I am having trouble with my code its only supposed to shoot one bullet but it shoots 3 and in only one direction im making a platformer btw heres my code //create bullet { b = instance_create(x,y,obj_bullet); bullets -= 1; b.speed = 15 //check...
  20. D

    Coding Help

    I am developing a clicker and i can't figure out how to make the shop prices increase. this is what i have in my obj_globals, what else do i need in here for that? ///init Vari global.money = 0 global.pc = 1 global.ps = 0 alarm[0] = 60 This is the alarm. ///Add Money global.money+=global.ps...
Top