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

key press

  1. T

    GML (Duplicate Thread) State machine state change is storing key_press boolean and influencing movement

    Sorry if this has already been posted, I'm not sure if my thread got deleted or not due to the gifs of my game I included in it (external links). Essentially, I have a state machine that changes from playerStateFree (free movement) to playerStateHide (stationary). Whenever I press any movement...
  2. N

    Keyboard Check Pressed Moves through 2 Objects on Vk_Left

    Hello all, very new to game maker studio. I have an Action Select Obj that I want the player to be able to cycle through, I have a step event that where I check if the keyboard_check_pressed is vk_left then hide the first object and show the second. The problem is when I add a step event that...
  3. M

    GML Toggling dual-wielding with one key

    I have 3 gun objects for an FPS I'm making. One is the main gun object (pstl) and two are when the gun is dual wielded (leftpstl and rightpstl respectively). All are children of the parent gun object (par_gun). The main problem I have with this system is that when I press the toggle key to...
  4. P

    GameMaker My game is behaving differently when I step through its code compared to when I run it normally

    Is it something to do with how the code I'm going through contains checks for key presses? I've tried holding down the relevant keys while stepping through the lines, and it still behaves like I'm not pressing those keys.
  5. P

    GML Visual Playing the Full Animation with Just One Button Press

    Hey, I'm new to Game Maker and I'm working on a horizontal shmup. I wanted to implement a shotgun blast animation, but the animation I created will abruptly stop when I let go of the keyboard key I have it assigned to, and the animation will resume when I press it again. I want it so that the...
  6. G

    DND - Reduce Var while key is pressed

    I am trying to reduce a var while the Space is pressed, I have a var set to 100 and under the Space key pressed event I have it set to -10. It does reduce for each key press but I want it to reduce -10 for each 5 secs the key is pressed.
  7. N

    GameMaker There's no tab key pressed event!

    I have recently noticed that there is no event for pressing the Tabulator key. This is not a problem since I can just use "keyboard_check_pressed(vk_tab)", but I think that this is a thing worth mentioning. Perhaps YoYoGames can add this in a later update?
  8. S

    GameMaker [SOLVED] Weapons won't swap when key pressed

    I'm creating a weapon swapping system where if you press a key, it switches which weapon you can actively use. Right now I just have a sword and a gun. In my objPlayer's create event, I start the player with the sword weapon: // Weapon Variable // 1 = Sword // 2 = Gun // Assign Variable weapon...
  9. D

    Check if key has been pressed for a certain amount of time

    Hello! I currently have a player that locks its horizontal movement if it is not on the ground and it is against a wall (until the jump key has been pressed), to create a wall slide/jump. Does anyone know how to check if a key has been pressed down for a specific length of time, then do...
  10. D

    iOS Detect key press on external bluetooth keyboard

    We are developing an iOs app for traing purpouses for disabled children. For that reason we need to be able to control the app on the iPad from an external bluetooth connected keyboard. We have developed an extension for key press detection in XCode. This extension runs perfectly as a...
  11. T

    Show countdown timer upon key press?

    Hello, I am relatively new to programming in GameMaker. I am currently working on a part where if you press a key, a countdown timer will appear on the screen. However, I haven't had much luck in having it update. When I press the A key, it does show that there is 5 seconds on the clock, but it...
Top