1. H

    Need help with IF SCORE code

    The if statement that is shown is trying to get the score code from obj_counter_15_red. when I put the global code (score) nothing happens. If I put this same code in drag and drop and make the IF SCORE apply to the same object, it works. Can someone tell me the syntax for IF SCORE to apply to...
  2. O

    Check buffer

    Hello, i use buffer_read, but if someone use old version, it will return outside of buffer error. Is there a way to check if it's in buffer last data input? Something like if(ver = buffer_read(net_buff, buffer_string)) // This wont work. Thanks for help!
  3. T

    room manipulation

    Hello there My game requires me to restart a room where my object is not in. How do I do this? dear Theghost
  4. B

    GMS 2 Character Knock back Doesn't Exist (SOLVED)

    I made sure I typed down everything from this tutorial video. I added the enemy knockback code, and it works just as I expected. But when I added on the player character (and made sure to copy the code from the video), all I get is this tiny message: It didn't crash the game, but it...
  5. Liam Earles

    Legacy GM Using Checkpoints and lives at the same time

    So I've been following Shaun's tutorial video on how to add checkpoints in the game and I did okay with it. But however, I'm having trouble with using checkpoints and lives at the same time. No matter what I do, the player would respawn (sometimes) to the checkpoint, and I would not be able to...
  6. T

    Global clock issues

    Hy there, I am working on a new game. And you know what that means right? New obstacles! I've encountered a problem that my clock doesn't get updated when the rooms change. Let me further explain: I have a clock in my one of my rooms. it updates every second when I am in the room. I also have...
  7. L

    Windows 2D simple character movement help

    Hey, I wonder if u guys can help me I need to make a platform 2d jumping script but no idea this is my code, It only goes left and right and falls, but no jumping if(keyboard_check(vk_right) && place_free(x + collisionSpeed, y)){ x+=spd; image_xscale = 1; } else...
  8. Suzaku

    GMS 2 Cant bookmark line in code blocks

    I found the bookmark feature on GM2 today but it doesnt seem to work well for me, I press ctrl+shift+1 on a line of code but it only bookmarks the window and not the specific line. Why that happens?
  9. Liam Earles

    Legacy GM Lives with Checkpoint

    So I'm making a game that will have checkpoints and lives as well as a health bar and a score mechanic. Here's what the code looks like for each event. Game Start: global.checkpointX = 0; global.checkpointY = 0; lives = 3; // you should probably have 3 as a variable just in case you want to do...
  10. R

    Help me with GML

    Hello guys i need help with my code. I create a object controller with this code: CREATE EVENT: switch1 = array_create(2); switch1[0] = obj_ground1; switch1[1] = obj_thorn1; switch2 = array_create(2); switch2[0] = obj_ground2; switch2[1] = obj_thorn2; world = 1; STEP EVENT: var input =...
  11. T

    image to big

    Hello I'm working on a game. My player sprite is 1000x1000. but I want to show it on the screen without it filling the entire screen. How do I do that? Thank you.
  12. M

    GMS 2 How to make object turn in certain direction

    I have a rectangle that I can move by right clicking on the screen and it will move to that point. I want to make a code to where I can designate which side of the rectangle is the “front,” and before it starts moving towards the point, I want it to rotate until it’s front is at the same angle...
  13. P

    Could use some help with variable

    Hello guys. I been watching some of the tutorials in yoyo games, the one that you have to destroy meteorites. It work perfect but now i want to improve some mechanics. I tougth i could give the bigger meteorites more life than the small ones but the things is i dont know how i can assign...
  14. Haow

    Legacy GM Shader+Surfaces: Please help!

    Dear Community, I am in need of desperate help with my project, I have been stuck on this for 2 months or longer!!! Yes, I have been studying, searching, more searching, and a bit more searching for an answer on google or anything else I could get my hands on. I have a zoom effect shader, it...
  15. D

    (Fixed) Enemy pushback different from given value

    When i first programmed the collisions with the enemies, it worked exactly how I wanted. But, it recently derailed and now it is fixed on (-)5 and not (-)10 . I thought it could be about the speed limits i put but all of them are (-)10 or above. I changed the values on the collision but it still...
  16. flyinian

    Design [solved]Tile collision code not working but, its close. I can feel it.

    Hey all. I am currently attempting to get this tile collision to work but, haven't yet. However, i believe I managed to narrow what might be breaking the code for me. When I disable the "else" statements within the "if" statements the player collides with the tile and i am able to move left and...
  17. D

    Dialogue sound everytime a letter is typed

    Hello I am a beginner at gms2 and I was wondering if anyone would help me I am tryting to make some kind of platformer or something I am not sure yet But at the intro of the game there is a dialogue while I was able to make it work and can t get my head around how to put a sound every time a...
  18. D

    GMS 2 *Title Change* Character not dashing when in the air

    So I am trying to make a variable to save me time when i call the letter 'Z' var zkey = keyboard_check(ord('z')) From my current knowledge, i know for ord() to work it needs to be in a argument which it is not in the code I wrote. However, writing if keyboard_check(ord('Z')) = true { do...
  19. KyleRansford

    GMS 2 How Does the Instance Creation Code Work?

    I have objects like, Sign Posts, Chests, NPC's etc, that can all have different actions. Instead of having multiple objects of the same type (Heart Chest, 1up Chest, etc.). Can I use the Instance Creation Code (when you double click on an instance inside a room) to specify what I want in the...
  20. S

    optimizing movement

    is there any way i can optimize this movement code to save space OBJ_Player Crate//: idle = 1; walking = 0; up = 3; right = 2; down = 1; left = 0; Action = idle; Direction = down; View[1,3] = v_p_upIdle; View[1,2] = v_p_rightIdle; View[1,1] = v_p_downIdle; View[1,0] = v_p_leftIdle...