code help

  1. RayArmahedgehog

    GML Can someone help me with a basic Beat Em Up controller?

    You know, the typical thing: - movement in 8 directions, with jump included (number of jumps defined by a variable). - If you press a key twice you run and if you stop pressing it you return to the normal state. - and that's all.
  2. H

    GameMaker Opposite camera lag

    Hey, this is just a question regarding the logic behind a piece of code that I've been trying to get to work. I currently have the camera follow my character with a smooth following effect that makes it look like the camera is kinda lagging behind the character. Here's that code: What I was...
  3. Gonix

    SOLVED Execute function stored in Ds_queue (or any data structure)

    I'm trying to make a function queue, where I could enqueue function with ds_queue_enqueue, and in another queue are stored the de-queue condition, each frame if the condition is met, the head function is de_queued. But I cant manage to store functions in the queue, only the returned value by...
  4. Redcakes

    Pressing F4 for fullscreen

    So I made a camera and I have it working. The only thing now is I want to allow players to press F4 to switch it into fullscreen. I have this code in a persistent object: if(global.fullscreen = false){ window_set_size(displayWidth,displayHeight); } ...which sets the camera to the settings I...
  5. S

    sprite gets stuck in wall

    hey guys, while i was trying to figure out my jump sprite i decided to try and copy paste someones code, it helped with the jump sprite, but when when the character spawns, it falls down and lands in the middle of the wall and i cannot jump or move. i took out tiny areas of code and this is the...
  6. T

    Need Help with Alternate View using Mouse Input

    So Im working on a game where I have a little view that comes up in the corner to watch my character when I leave as another character in the game. But I want the view to disappear when my mouse goes over it, because it puts my mouse in that point in the room when it goes over the view, I tried...
  7. G

    GML Pixelated Text

    I am having a problem with the text coming out weird and pixelated. I dont know what to do to fix it. I have read some stuff on scaling but I dont know how to do that. If you dont know what I am talking about here is a picture It looks wrong to me
  8. N

    Skip when moving

    Hi im following this tutorial on youtube, but when my character drops to the ground. it skips along the floor. and some times it get stuck in the wall. and when i hit a wall i skip again. anyone have a solution?
  9. L

    WHY CODE NOT WORK!!!

    im trying to toggle a button like if i were to be changing items and keeping it on so if i press the 1 key the item will stay on until i press 1 again My Code: //Toggle I/O Key 1 if keyboard_check_pressed(ord(1)) { if Toggle_Trigger1 == true { Toggle_Trigger1 = false; }...
  10. S

    GameMaker Wrong switch statement

    Ok i have problem with this. My switch statement make fatal error at line 20 and in line 29 i think same issue.Please little help with this. //variables kspace = keyboard_check ( vk_space ) ; attackspeed = 3 ; dire = 0 ; //code for attack move enum dir { maxx, minn, }...
  11. S

    GameMaker [SOLVED] // Object stick to another and move together like 1 object even with rotation.

    Ok now is everything work good and i update this code. Now you can just copy the Code. // Variables image_angle = obj_player_player1.image_angle ; // Copying image_angle of another object in this case image angle of object1 is apply to image_angle object2 object_to_stick =...
  12. S

    GameMaker Set timing action without Timelines. Code dont work Pls HELP..

    Hi everyone, i have problem with some part of code. Shortly say. I want set time action [or duration [cooldowns] of abilities and spells] when i dont want use Timelines , but i have a problem with this. Here i try set the shifting mode not like a sprint but like a shifting fast move to direction...
  13. B

    [solved] is\won't be logic help (fade in\out)

    I have created an objected that draws a shape on the screen while the player is colliding with it. I have coded it so the that shape fades in, after the collision with the player object, and that's working great. However, I am trying to come up with a way to fade the drawn shape away, when i...
  14. S

    Code Randomly Stopped Working

    Hello all. I'm verry new to this here program and would like some help. I followed a youtube tuturial on how to make a horizontal collision to learn the basics of coding. The code worked great except for some minor problems. Suddenly one day the code stoped working out of the blue. The vertical...
  15. Z

    Legacy GM Problem with simple High Score

    Hi, I have problem with simple HighScore tab .I tried YouTube tutorials.I tried to figure It out and It didn’t get well.Please if you know simple code of HighScore Tab that will save and show saves of players with scores every time the game ends.Player can write score and if score is too low...
  16. B

    asset_get_index + file_text_read = problems

    I got GM couple weeks ago and decided to make a simple text game to test it out. Haven't touched code in years so I'm rusty. Well anyway, I wanted to store the text and sprite names and so on in a text file. Not even 10 lines of code I stumbled into a wall. When I get the sprite name with...
  17. B

    GML Help with right-stick in twin-stick shooter

    Hi everybody, I'm having a bit of trouble with the behaviour of my right stick, which aims in my twin-stick shooter. It work great with keyboard & mouse, where the mouse points the direction to shoot. But I've been starting to implement gamepad controls instead and so far everything works except...
  18. F

    Windows shooting

    im making a platformer game and i need to add shooting can anyone help me with a code.
  19. T

    Legacy GM So, like a idiot, I decided I want to program water...[SOLVED]

    EDITED: to those wanting to know the solution, check below. Hi there! I'm still quite new to game making even though I bought GM:S like a year and a half ago, but have elected to go with GML as much as I can and have been learning under the Shaun Spalding tutorials over on YT. Recently I...
  20. W

    GML Highlight button [Sloved]

    I have buttons that highlight when u r on them. But they are not highlighting right. Idk why can some one help? This is ob_store_menu if (keyboard_check_pressed(vk_up)) { if (global.store = 3) { global.store = 0; } else if (global.store >= 0) { global.store += 1; } }...
Top