state machine

  1. 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...
  2. 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?
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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.
  9. madorca

    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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. PrismaticRealms

    Asset - Extension PRState: A clean and simple finite state machine implementation.

    Hello again, everyone! Once again, my company, Prismatic Realms Inc. and I would like to introduce another new extension just released on the marketplace! It's called PRState. This small extension will allow you to quickly and easily implement state machines for your game objects. Use this to...
  17. Null-Z

    Legacy GM My first boss with State machines. COMPLETE!

    Oh boy, this is something I'll need a lot of help with... I've planned out every state I want the boss to be in and taking it one part at a time. The script I have for Intro moves the object down but it doesn't stop or play the screech animation, what am I doing wrong?
  18. JeanSwamp

    GML Shooting State Help

    Hello, I'm currently changing how my shooting works. Before, pressing the shoot key made you join a shooting state where HSP would be 0, locking you in to shoot, kinda like Ghost n Ghouls did back in the days, until the animation finishes and you're back to idle or run state. I decided to give...
  19. U

    GML [SOLVED] Move state interrupts other states

    Hello there. I'll try to be as clear as possible, but english isn't my mother tongue, and this is a fairly complicate thing to ask, for me. I can post a video, if you want. This logic is based on Heartbeast RPG series, since it actually worked nicely, but I've tweaked it to suit my needings. So...
  20. Null-Z

    Legacy GM Oh boy, State machine transition.

    after Watching a few tutorials on what state machines are, I realize how helpful they can be but I have an issue. I don't know how to transfer my old code setup into a state machine type. All the states I'll need are Idle, Run, Shoot, Jump, and Slash Problem is, I don't know where to put they...