state machine

  1. samspade

    GMS 2.3+ Struct Based State Machines

    I'm working on creating a struct based state machine system. My primary goals are for it to be: Simple to use Handle entering and exiting a state separately from running a state Use structs be flexible and expandable My current set up seems to be working well, but I haven't tried to do this...
  2. R

    [SOLVED] drive and attack

    hello guys, I'm having a little sprite problem. I am trying to make my character walk and attack while walking, well it works and I did it but the visual part I am having difficulty I have a sprite for him to stop attacking and another one for him walking and attacking, the problem is: he...
  3. PrismaticRealms

    Asset - Objects PRState: A simple and efficient finite state machine.

    Available on the YoYo Games Marketplace and on Itch.io. Requires GameMaker Studio 2 v2.3 and up. PRState is a GameMaker Studio 2 (GMS) package created by Prismatic Realms, Inc. It enables you to implement a simple and efficient finite state machine for your GMS objects. PRState is designed to...
  4. Palocles

    GMS 2 double tap for dash/run, where to put in state engine

    I'm implementing a State Engine for my game and I'm wondering how double tapping a button for a dash move, at higher speed than a walk, will interact with the state engine. When the 'forwards' button is pressed the machine puts the player into the walk state but if i release the button...
  5. toothmosnter

    GML (Duplicate Thread) State machine state change is storing key_press boolean and influencing movement

    Sorry if this has already been posted, I'm not sure if my thread got deleted or not due to the gifs of my game I included in it (external links). Essentially, I have a state machine that changes from playerStateFree (free movement) to playerStateHide (stationary). Whenever I press any movement...
  6. L

    State machine questione

    I am thinking about making a turn based shmup prototype. The idea is that everything including bullets do not move unless the player inputs a command. So I think how this would work is that there would be a global object that controls everything and each object reacts based on input. Am I...
  7. Null-Z

    SOLVED State Machine issues

    so, I've got a state machine for this shadow biter here but as you can see, it seems to be skipping or going through states too quickly. [/SPOILER] What am I doing wrong?
  8. Slyddar

    Asset - Project Tile Based Moving Platform Engine

    Tile Based Moving Platform Engine This tile based platform engine uses efficient tiles for instance collisions, as well as incorporating those efficiencies into horizontal and vertical tile layer moving platforms. Some of the features of the engine : Tile Based Collisions : Tiles offer the...
  9. MartinK12

    GML [SOLVED] Where should I put hit, knockback, immunity and health - state machine or?

    I have basic working state machine for player in platformer game and it’s working fine. Currently I have player states: on_ground, in_air, idle. I want to add hit – for starter it will be basic collision event but later I want to create my own collision code in end step. Whenever player gets...
  10. A

    Legacy GM [State Machine] Crouch Animation Loop

    How do I stop my crouch animation at the last frame? I tried setting it up like this and it still loops. // Get Input scr_jpgetinput(); // Crouch Animation sprite_index = sp_jplayercrouch; image_speed = 0.4 if sprite_index = sp_jplayercrouch && image_index = 6 { image_speed=0 } // State...
  11. Z

    GMS 2 State machiens small problem

    I'm sure this is a quick fix, but I have been up all night trying to find a solution for this aggravating problem. Okay so basically, I want to have the player stop moving completely while in the attack state"(ATTACK_HAMMER)", if he is not grounded, i have a script i can call to check if he is...
  12. F

    GMS 2 Jumping mechanic issue

    Hello Guys, i'm actually trying to study GML/Programation Logic and in the same time developing a game. (On GMS 2) I'm studying with videos on YouTube. On the past 2 weeks i'm developing and studying the method to create a game using the HeartBeast video's, to be more precise, the "Hack'n'Slash...
  13. Suzaku

    GMS 2 Is there any plugin/extension for state machine?

    I remember when I was using Unity, there was a GUI special for finite state machines, with a flowchart, I wonder if there is some kind of plugin to reproduce the state machine in gamemaker visually like Unity does. Thank you.
  14. M

    Enemy Pathfinding(mp_grid) / State Machine Problems

    Hello everyone, I know this question asked many times before and yes I checked old posts and tried different solutions and approaches as much as I could but I'm still learning :/ (I started to GMS 4 months ago, pretty new). I will try to explain my problem. I'm trying to make a topdown shooter...
  15. Suzaku

    GMS 2 Basics about state machines

    I having a hard time figuring out what are the main elements of a state machine in a general scope. So far I know that there are 3 main elements: 1. the switch in the step event that is supposed to verify on which state the object is at each moment, then it activates the script accordly to the...
  16. KPJ

    Need help with state machine (GMS2)

    Hi everyone. I need help regarding state machines in my top down game. I have four states (idle, moving, attack and stealth) The idle, moving and attack states work, however i need help with the stealth state. I want it to be so that when the player presses the shift button, the player will...
  17. D

    GMS 2 [SOLVED] State Machine Not Working Correctly

    Hey guys... I have this issue on a state machine. I'm trying to figure out how melee attacks work and I came across this error where I finish the attack animation but the state doesn't change. This is part of the attack state on my player object: sprite_index = sPlayer_Attack...
  18. Robzoid

    collision event vs place_meeting()

    I'm working on a 2D platformer and am in the process of converting my player object's step event from a bunch of giant, messy if statements to a state machine. I'm trying to decide if I should leave my enemy collision event as is or remove it and replace it with this: if place_meeting(x, y...
  19. A

    GML [SOLVED] I Am Not Using ENUMs Properly

    So I've been reading all about these newfangled "State Machines" and I thought I'd rewrite my dialogue box script to fit them. Of course, I screwed something up due to lack of knowledge again. Basically, what's supposed to happen is that scDialogue (on the bottom) is supposed to set the PSTATE...
  20. Null-Z

    Legacy GM First Player state Machine.

    Well, I'm finally attempting to convert my jumbled player code into a state machine. but, as to be expected, problems ensue. [/SPOILER] [/SPOILER] [/SPOILER] a REAL mess I know, and probably making things more complicated than need be. but I'm still very unsure how to do this for a...
Top