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

step

  1. Y

    GML Sequence not running

    I have a sequence and script for running the sequence. The sequence won't run when I try to call it in my game manager object. Through some debugging, it looks like it is creating a bunch of layers and sequences endlessly. Why wouldn't it run at least once then? Did I miss a step with calling...
  2. Y

    SOLVED Sequence not running in Switch statement

    I created a sequence that overlays the screen and plays an animation. I call the sequence with a script which is placed inside of a switch statement. After some trial and error, I think the issue is possibly due to event order. Perhaps my sequence isn't running because it is waiting for the rest...
  3. T

    GML Difficulty understanding Jump code

    i've seen a tutorial about creating gravity and i'm in doubt about the functioning of the jump code vsp=0; grv=0.3; vsp=vsp+gvr; if (place_meeting(x,y+1,oWALL)) && (key_jump) { vsp = -7; } y = y + vsp my doubt is, why doesn't the player character just teleport up as if i change the code to...
  4. O

    GameMaker Code equal to collision event. Place meeting or instance place gives different results

    I would like a command identical to the collision event in the step both place_meeting and instance_place by default generate different results than the collision event. I would need this code to optimize the game
  5. Someone You Might Know

    SOLVED local variable xorigin(100011) not set before reading it.

    Hi, good people. Today, I faced a weird error, which is in the title. Full error log: ___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event0 for object obj_menu: local...
  6. NovemberTender

    SOLVED switch statement loop even with break;

    if ((menuability_commited != -1) and (global.menuability == true)) switch (menuability_commited) { case 4: { instance_create_layer(oPlayer.x, oPlayer.y, "Held_Tools",oFireorb); break; } case 3: {...
  7. M

    GameMaker Character movement thing

    So my character that im playing as is weird. When i first hit "d" (right) he teleports a meter away before starting to walk. Same as when i press "a" (left). It annoys me because it makes the game kind of 💩💩💩💩. How can i fix this?
  8. C

    SOLVED Image_angle Drawing Circle Out of Sprite

    Hey all, I'm a decent programmer but new to game dev, so I was following the GM2 tutorial "My First Game - GML". I followed the instructions and when I went to test rotating my ship, instead of just rotating like the original asteroids or like the example I was following, it'd rotate, but fill...
  9. C

    GML [SOLVED] The same code in a different place behaves differently

    I have a small bit of code: if(!global.round_running) { global.round_running = true; global.board = ds_list_create(); for(x_index = 0; x_index < size_x; x_index += 1) { column = ds_list_create() for(y_index = 0; y_index < size_y; y_index += 1) { y_pos =...
  10. T

    Need help with using string_width(text) method

    Hi, I am working on building an in-game textbox that requires the use of the string_width method. I ran into a problem: Let's say I have a string called "text" text = "This is my string"; When I do: var size = string_width(text) in the Step Event, I got size = 400; (this is just a random...
  11. T

    Legacy GM How to make an alarm that starts & loops in the step event ?

    I'm making an enemy object where the enemy will go on a specific path to patrol.Then he will stop at a certain point to look around for the player. I planned to make him change his sprite direction every 2 seconds(Enemies vision's for another day)but i seems to stuck here.I want the alarm to...
  12. E

    GML "Draw Sprite" on click

    Hey coders, I want to draw a sprite on click and have it stay there until I click again. This is what i have so far. if mouse_check_button_released(mb_left) && position_meeting(mouse_x, mouse_y, oStats) { draw_sprite(sStatBG, 0, 400, 400); } I understand the draw function is usually in the...
  13. A

    GML [SOLVED] Trouble getting Collisions working in Step event of Ball

    Hi there folks! :) I am currently working on a game which is a breakout derivative in which the paddle is a ship and the ball is a ball of energy. I am using GMS1.4 and trying this code in the ball's Step event, yet the ball literally just zones through everything which does not have a separate...
  14. M

    Mac OSX Attack only playing first frame of Animation

    I'm still pretty fresh to gamemaker and am currently trying to animate a player w/ attacks. I have a character as an object and a claw (the weapon) as a separate object so that attacks can still be done in the air. Here's part of my code for the claw. This is the only part of the code that...
  15. K

    beginner question

    Hi I am beginner in game maker, and I have a question, maybe someone know this? I have code that look like this in the step event. if (var_doNothing = true) { sprite_index = spr_default; } My question is, will this then happen every frame? Will it keep on putting the sprite_index each and...
  16. T

    GameMaker How to store an objects x position on the first step of a state

    Hello, New to GMS, first game and currently working on the movement for a platformer and I'm stuck on one particular movement. When on the ground the player is in the "grounded" state, by tapping left or right on the analogue stick the player enters the "dash" state. When in the "dash" state I...
  17. Dr_Nomz

    GML keyboard_check(vk_space) doesn't work? (instance_change)

    So I put this in the step event of my character... if keyboard_check(vk_space){ instance_change(obj_Character_ROLL,true); } But it wouldn't work. It works fine if I just put the middle bit of that code into the "spacebar" event, but why doesn't it do anything like this? EDIT: Is it a...
  18. MartinK12

    GML [SOLVED] General question - Should I split code between step and draw event?

    Many times I have to change variables and sprites according to some other variable. In example: if clicked { var1 = 1; var2 = 2; draw_sprite... image_index... image_speed.. } Should I split this into step and draw event like below so check clicked both in step and draw event? In step event: if...
  19. Dr_Nomz

    Legacy GM Any Key or Step?

    For something like checking when I press the move key or whatever, for example. Also WHY is there no detailed information about Any Key in the Manuel? That's really annoying guys. (STEP has a document...)
  20. Macro deVoid

    GML Passing values to new object instances

    This has been bugging me since I took up GML about a month ago, and looking for advice or suggestions on best practices. I have a spaceship game, and so far all it does it break asteroids up. The ship shoots a missile that collides with the asteroid, reduces the asteroid's health, and triggers...
Top