step event

  1. D

    place_meeting trouble

    I'm making a basic space shooter arcade game and instead of using the built-in collision event I'm using place_meeting. Since this would have to be in the step event and the step event runs every frame I made a boolean variable named hit that will become true once an enemy hits the player's...
  2. N

    GMS 2 Having Trouble Moving Sprite Animation Frames along X and Y axis

    Hello all, Haven't used game maker long but I love it so far! My current issue is that I have an Action_Selector Obj with an attack option, when the user key_check_pressed(ord("A")) on that selection I want to hide the Idle_Character_Obj and un-hide the jump_to_target animation then wait at...
  3. T

    GM:S 1.4 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...
  4. Marko Kajtazi

    Problem with the "step event"

    Hi everyone, I wanted to make the weapon fixed to the player (as a different object). The problem is that in the step event I wrote x = oPlayer.x and y = oPlayer.y, I don't know why but there is a small offset when the player moves. Does someone know what is happening? Thank you.
  5. Jochum

    GML Problem with step event and point_in_rectangle

    Hi guys, I created this piece of code, for some reason it's not working. I have the variables stored in the create page and as check I created a rectangle with the same positions as I'm checking in the step event (same variables). The rectangle is drawn on the right place but for some reason...
  6. Zack

    GMS 2 Designing Levels in Notepad (video & text versions)

    GM Version: GameMaker Studio 2 Target Platform: All Download: zackbanack.com Links: Video Link Summary: GameMaker Studio 2 comes with an advanced room editor. But, sometimes you might want to design puzzle, maze, or roguelike levels in something a bit more simple. I showcase how - and why - to...
  7. I

    Object Spawning Help

    So for this game I'm doing, I followed GravityShift Games' tutorial on making and Endless Runner but I'm expanding on it. Basically, i have an object that spawns enemies until the players gets to a certain score. Then it stops spawning enemies and spawns a jetpack that essentially triggers the...
  8. Chaser

    GML Sprite animations within the step event

    Hi, i have been working with 'States' and enums and i think i have got a pretty good hold of it. 1 object instead of many of the different behaviours, is very good way of working. i have my scripts, and yeah i'm pleased with where i'm going, however, that is until i come to the sprites and...
  9. AndrewCampbell

    Simple Code not Working

    Cant for the life of me figure out why this isn't working, and I'm sure the answer is simple. Here is the code below, the card var is supposed to change when pressed, but both of their values are staying null (0) when pressed. The error I believe has to be within the step event for that to be...
  10. Lorp

    GMS 2 collision acting funny

    GM2 Windows 10 within obj_player step event solid off physics off no collision event total newbie I'm playing with collisions for a top down tank game and came up with this bit of code. It draws a box with hit lines and feelers in the corners. I'm wondering why it works on the right side but...
  11. G0vnah

    Camera Object Won't Read Variables (SOLVED)

    (TL;DR version - I'm having trouble with the codes shown in the image. The game acts like the "view_w_half" and "view_h_half" variables don't exist on the step event page, and only uses the data they stand for if I put the data itself into that place)...
  12. Wild_West

    GM:S 1.4 Can't stop character movement

    I'm going through my project and trying to make sure my character can't be allowed to move whenever certain things are going on like item menu being shown, or speaking to NPC characters, and for some reason it's only working half the time. For example when I speak to ONE NPC I can't move until...
  13. AquaticChaos

    GMS 2 State machine not updating

    I haven't used GMS 2 that much, considering I've just gotten a better laptop to play games and code on (My old computer can't run it), plus I've used GMS 1.4 since 2016. The main issue I'm running into is that, for some odd reason, the Dash state won't return to the Move state after the variable...
  14. F

    GMS 2 image_speed doesn't work

    Hi everyone. I just started using GameMaker a while ago and so far I haven't met any unusual problems, well until now. Everything in my script seems to work well except for the "Slashing" part. The idea is that the attached arm will turn invisible while my sprite begins it's slashing animation...
  15. jobjorgos

    GM:S 1.4 does an alarm that only needs 1 step to trigger work in a step event?

    I have tons of objects with alarm[0] = 1; in a step event. I know alarms should not be placed like that in a step event, but in this case where the alarm only needs 1 step, would this trigger or not in a step event?
  16. H

    GM:S 1.4 Trying to Teach my child time

    Right now I have sprites that are have a half circle to indicate the time of day. === Example === Object Name = con_bg Event = Step if time_cur = 8 { sprite_index = spr_bg_8am } = = = = = how can I find the current time to match the "am/pm" sprite? I already proved that time_cur will...
  17. Sarena

    GMS 2 [SOLVED] Player only Attacking every other click

    I'm creating a combat system for my mobile game where every swipe, the player should attack. Right now, it only registers every other swipe, so you need to swipe twice in a row in order for the player to attack. It had the issue when I originally used double-taps (or right-clicks) instead of...
  18. D

    GML [Solved] Coding hp loss in step event

    While coding I ran into a problem trying to figure out how to make particular instances lose health while in a step event. The code below shows when I activate my "beam" ability it checks if the instance is inside of the beam's area. If the object is then it loses 2 hp per second. I ran into...
  19. B

    GM:S 1.4 Remaining enemy objects ignoring step event code upon one being destroyed

    Hey, I've picked up GameMaker: Studio 1.4 recently and was in the initial stages of making my first prototype while learning from a video series. After having programmed an individual enemy, I wanted to try and make having multiple of the same enemy object work. It took time and patience, but...
  20. S

    GML Step event = false?

    Is it possible to make it where if a certain situation happens, the step event becomes false until alarm[0] is done? I want to make the player have an automatic idle animation play when the level beings, and then after the alarm is done, all normal gameplay returns.
Top