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

code

  1. O

    I need to know what i'm doing wrong

    { if(keyboard_check("H")) if(alarm[0] <= 0) { global.hp+=4; } } I use the above code for healing, but it doesn't work the way i want it. My health goes up passively when i want it to be a key press. The only way it stops is when i'm pressing any key...
  2. General Nuclear

    GameMaker Need help, sprite won't show up

    I am trying to make a point & click to move system, And i copied some code from youtube. That code only went for four directions, So i went for eight, but for some reason it won't show my third sprite between 22 and 338. Youtube source if (mouse_check_button_released(mb_left)) {...
  3. W

    GML struct variable scoping

    If you create an empty struct and extend it like the below example, self is not bound to the struct. So if you run the test function it can't access the struct variable v. global.struct1 = {} global.struct1.v = 0; global.struct1.test_func = function() { v++; }; Creating the same struct...
  4. D

    GML Trying to make variable jump

    I'm following Shaun Spalding's guide for specifically platformers ( ), and I'm trying to have my character be able to stop jumping at any time allowing the player to control their jumps for specific platforming. Does anyone know how to do that? Code //Keyboard movement var _keyRight =...
  5. SandieYT

    problem with dynamic shadow

    so i was following a tutorial (again) and found this bug, it wont make the free part below black this is the image of the bug and the room the code: //create event (in wall object) [B]point_lt = 0 point_rt = 0 point_ld = 0 point_rd = 0 instance_create(x,y,wall_mask) //step event...
  6. Plubu

    SOLVED Game's window when it starts it's at upper left of the screen

    Hello everyone, I have a game when it runs, it starts at the upper left of my windows screen, why's that? After the main menu however, it goes and fixes itself. //Room start //Camera Setup window_center(); global.CameraX = 0; global.CameraY = 0; target = Player_Object; CameraWidth = 960...
  7. oDWreckz

    Changing Sprites for falling Platforms

    Hello, so I'm brand new to coding and I don't understand the animation of sprites yet. I have made 4 sprites for a falling platform that I want to change in order. Sprite one is the original platform, sprite two is slightly crack, sprite three is more and then sprite four is crumbled. I want...
  8. C

    How to screenshot room offscreen?

    Hello GMC, I'm trying to screenshot a portion of the room that is currently offscreen. I know the to-go is screenie = sprite_create_from_surface(application_surface, ...); sprite_save(screenie, 0, "blabla.png"); sprite_delete(screenie); but that doesn't work when the sprite renderings I am...
  9. M

    SOLVED What does this line of code mean?

    neartree = instance_nearest(x, y, tree_obj) Its in the context of procedurally generating tree_obj around the room. I just don't understand how a variable can equal what instance_nearest returns.
  10. U

    Object Follwing Player flickering like crazy

    I created an object that follows the player after it was collected. But somehow if the player stands still it goes to the position it needs to be and flickers like crazy. Like it wants to move asap. My code looks like this: I tried stopping the code if the object hits the point but it didn't...
  11. V

    Need help - Trying to make a sliding door that opens when player is near, and closes when leaving area

    I have a door sprite with 10 frames. 1 is shut, 5 is open, 10 is fully shut again. Just wondering about the best practice to get this sprite to play from frames 1-5 when player is near, and from 6-10 when leaving. I have tried many combinations of image_index & image_speed in conjunction with...
  12. N

    SOLVED Help with collisions

    Hey there! I'm making the game Godstone in GameMaker 1.4, and currently recreating one of the character's abilities. But I have trouble with some collisions that has followed. I have attached both the script behind the ability and a gif so you can see it visually. The script is in the step...
  13. PJProgramming

    GameMaker Falling Collision Issues

    Trying to code a simple platformer and I'm having some issues with falling onto platforms. The player character will either be slightly above the platform when he lands or slightly below. If I use full numbers for the gravity variables (1, 2, etc.) I don't have this problem but then it messes...
  14. agamecreator

    Gamemaker TV (GMKTV) please help with streaming live TV in a gamemaker game that acts like a real TV

    I have questions about a potential tv in gamemaker 8.0 I call it, "Gamemaker TV" "GMKTV" or "(--7) TV" (--7) represents the old gamemaker logo of a red sphere and silver or gold hammer hi all, if you didn't know I used to be on the old sandbox.yoyogames.com website, which is why my...
  15. I

    Two Step code invalid

    Hi! Because I got this error message when pasting the verification code, GM is installed on Linux Mint.
  16. D

    IDE does not respond to keys

    After loading a project, the code editor does not respond to ENTER and BACKSPACE keys making it very difficult to edit my code. Weird that some events can have their code editted normally but others can't. I can edit comments in the code (and remove them) but I can't push them down if I make a...
  17. Th3D0c0

    Objects always spawn the same sprite

    Hello, i am just starting to learn GMS 2 so forgive me if this is a stupid question. I was following a tutorial where i had to put a new Object (a gun) into my Workspace. But every object i place in the workspace becomes the sprite of my character. thx for the help!
  18. mumay

    why my code doesn't work ??

    I was following a tutorial but idk , can somedy help me fixing it please ?
  19. mafon2

    Multiple instances in "instant_place"

    Hi, How do I assign different instances in one var ? (I want every moving object to change its speed and other properties in certain areas) For example, I wanted these areas' code to look something like this: guest = instance_place(x,y,o_player_char) || instance_place(x,y,o_enemy) ||...
  20. M

    A parachute for 2d side-scroller platformer

    I got a pretty good idea of how to implement this but I'm not so sure about the fine details. I would love they are anybody's ideals about this ideal. Especially how I can get combined with others I have for my game. LIke grappling hook that lets the Player swing around Bionic...
Top