• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

code help

  1. 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...
  2. TrilL

    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...
  3. 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
  4. 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?
  5. 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; }...
  6. S

    GMS 2 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, }...
  7. S

    GMS 2 [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 =...
  8. S

    GMS 2 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...
  9. Bomb The Moon

    [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...
  10. 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...
  11. zimice15

    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...
  12. 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...
  13. 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...
  14. F

    Windows shooting

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

    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...
  16. 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; } }...
  17. W

    Legacy GM Enemy animation in four directions

    I am trying to make my enemy animate in all four directions. But it only goes left and right. I know its because of the right and left code on the bottom but I cant think of how to make it animate in all four directions Here's my code: if (x != xprevious || y != yprevious) { image_speed =...
  18. W

    Windows Creating a txt file to the desktop of your computer

    I have been thinking of a game where the game creates a file on your computer but I have no clue how to set it up. I know the code to create a txt with a ds_map and file_text_open. But dont know how to make it go to the desktop of a computer. Here is the code for the creating txt file: help =...
  19. W

    GML A wander state for an enemy

    I need help making a wander state for my enemy. I have been having trouble with this. Here is my code /// sc_enemy_wander_state randomize(); var x_wand, y_wand; x_wand = x; y_wand = y; if (distance_to_point(x_wand, y_wand) == 0) { do { x_wand = random(room_width); y_wand =...
  20. C

    Code Error That I Cant Figure Out

    OK, so im watching a tutorial, and I have followed everything exactly. AND his is working fine. But when I do it, I get this: ERROR!!! :: ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object...
Top