code

  1. R

    Code only works on first enemy created

    Hi everyone, I've got a bit stuck on an issue. I have my music change when in a certain radius of an enemy. However it only seems to work on the first instance of the enemy that was created. Any idea why it only works on one enemy? Big thankyou in advance for any help. EDIT: Also worth pointing...
  2. A

    GMS 2 [HELP] Moving platforms

    Hello! I am trying to code a moving platform, however, it sometimes (not always) glitches into place and just...stays there shaking (not touching the walls or anything it might be colliding into). I would like to know what could be causing this in the codes. CREATION: randomize(); dir =...
  3. M

    GMS 2.3+ Room Transition not working

    Hello, I have come from Shaun Spalding's video on Transitions. And I can't see anyone else having this problem except for me. I am quite new to coding so I will have to apologize if it's an easy fix or whatnot. Basically Whenever I go to the end of my room where the OLevelEnd Transition is, I...
  4. I

    State Machines

    Hey guys, First time using GMS2 and posting. I'm running into issues with my state machine. I'm not getting any syntax errors, but the game isn't loading the states. Basically, I can't move after implementing the state machine. Any advice or ideas on what it might be? The project can't be...
  5. Smidy3

    SOLVED Top Down Shooter - Strafing Problems

    Hey Everyone New here to the world of gml and gamemaker. Im making a top down sci fi shooter; The players ship (Proto1) accelerates forward with "W" and reverses with "S" "A" & "D" rotate the ship. and i want "Q" & "E" to strafe left and right, but for the love of me i cannot seem to get...
  6. 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...
  7. 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.
  8. MoriMori

    Beginner help needed rock,paper,scissors

    sprite_index = choose( spr_card_paper,spr_card_rock, spr_card_scissors); This was made in the create event with obj_cards, which is a parent to the objects; obj_paper, obj_rock, obj_scissors Now if you've played rock, paper, scissors then you understand how the game works, now I need help on...
  9. G

    GMS 2.3+ For-loop efficiency

    Dear community, I want to draw a string with 2, 3 or 4 different elements after each other. The elements are in a ds_grid called ds_AllAgents. I now have this super inefficient bit of code and am wondering what are good ways to make it (way) more efficient. Thanks in advance for your help...
  10. itarkytec

    Windows Need help making a string

    Hola comunidad, estoy necesitando un poco de ayuda, agradecería que las respuestas a este post estén preferiblemente en español, aunque si es de ayuda no me molestaría en recibirla de todas maneras. Contexto: estoy intentando hacer un cuadro de texto que solo acepte números como entrada...
  11. face

    GML Programming basics in 20 minutes. (cheat sheet)

    GM Version: Studio 2.3 Target Platform: Windows Download: see code below Links: n/a Summary: In this tread I will teach you the basics of programing with GML. Attention: Useful information will be available here but you will need to use this regularly to get decent at it. What not to expect...
  12. sweep

    GML sprite issues

    Hope you can help,it's probably an easy fix but I can't find a solution. My player isn't switching to the correct sprite when I am climbing. The code is below. The player changes to its falling sprite while going up or down a ladder. Is the jumping and falling code overwriting the climbing ...
  13. konkrz

    Windows Code sometimes works, sometimes doesn't

    Has anyone else encountered issues with code sometimes working and sometimes not? Personally I have seen it with instance_place_list and with for loops. I think it only happens in instant events (Create, Destroy etc) not in step/draw. Thinking more about it, i think it is about variables...
  14. D

    Galaga style enemy behavior??

    trying to make a galaga style shooter game, but have been stuck on enemy behavior. I have tried many different ideas for it but always end up with an issue that I can't find a way around. I have a non-visible object that acts as the creator of the enemy instances off screen at the top and use an...
  15. phillipPbor

    GMS 2.3+ screen problem.

    i happend to stumble upon a problem that i cant fix, recently i was making 2D tarraria with game maker studio 2 but while making a game, i found out the problem is that off-screen is black. after following the tutorial of minecraft part 3 here following tutorials from the other user here i...
  16. flyinian

    SOLVED What would cause a sprite to animate at room speed(or really fast) when its coded to draw in the draw event?

    Newest: So, I just tested the code in another object's draw code and still had it animating really fast. I then added the "image_speed" in the create event and set it to 0.1 . This slowed it down and it appears to animate at desired speed. Could someone explain this to me? As well as, how to...
  17. G

    I am getting a programming error message: Variable <unknown_object>.y(1, -2147483648) not set before reading it.

    So, i follow a tutorial and i made the script as i saw from the tutorial but i got this message ___________________________________________ ############################################################################################ ERROR in action number 1 of Create Event for object...
  18. flykidsblue1

    Idea Is GITHUB a viable way of storing files for my games?

    Hey everyone! So I basically want to add a "news" section in my game where users can be informed of any upcoming updates to my game/games and what not. I was using the http_get_file(); funtion to download the "news.zip" file. I was first thinking of using google drive, but each time I delete the...
  19. C

    Hot bar Spell cooldowns

    I'm currently working on a hot bar for spells in my game, and I got something working but I think its just way to much unnecessary code. I was hopefully one of you Game maker wizards could help me. anyways code: I only provided the code I'm using for the spell cooldown. here are 4...
  20. Daniel Mallett

    Sanity check

    I spend a lot of time coding alone. I always feel as though I am in an echo chamber. Is there anyone (Preferably someone with more experience than me) that would be willing to take a look at a sample of my code just to offer some advice. Just to check I haven't got any bad habits or doing...
Top