state machines

  1. Dany24

    How to make AI advance to different instances of an object at the same time

    Hello, I hope you can help me I am trying to make multiple instances of a single object (npc) go towards 4 different towers. but instead of each instance going to a different tower what it does is that they all go to a single tower I use a state machine in each example object in the tower object...
  2. A

    How do I get my character to move after inserting the input code into a script?

    Hello all, I recently joined a Udemy class so that I can utlilze finite state machines. However, for some reason, the code, when inserted into the script doesn't allow my character to move left and right, they can only jump. I'm not sure how to fix this and I already asked the instructor for...
  3. A

    Collision script won't run

    Hey everyone, I'm trying to create a normal state so that I can switch between other states, but to do that I decided I needed to make a normal script which contains a script for player input and collisions. However, when I tried to make a script for the collision block of code I get this...
  4. N

    GMS 2.3+ enum problem

    Hi, can anyone help me with an enumerator problem? it shows me an error, the enum assignment must be an integer constant. I want to make a state machine with this method than in studio 1 of the game creator it work
  5. Evan Kinsler

    GMS 2.3+ (State Machine) Am I in the right direction with this?

    So today I tried to make a navigatable menu using only knowledge I have gathered from state machines and enums. At the moment nothing shows up. This is what I have inserted into the room... just these 4 things. And here is the code I have for a parent object that I have made for each of the 4...
  6. K

    Animation issues

    I have been working on state machines and have gone through Gloomy Toads tutorial, Shaun Spaldings tutorial, and looked through several pre-built options. The issue I have regardless of the code I use is that the player character gets suck on animations/sprites. When I land from a jump it...
  7. K

    GML [SOLVED] How to avoid exiting state machine if there is a wall ontop of my character?

    Hello, noob 856431684 here! Im making my first game after space rocks in GMS2 and i've "learned" state machines, basically all my animations have a state machine. the problem is that when I press "C" my character crouches OK BUT when I press "C" again and there is wall ontop of my character...
  8. 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...
  9. Slyddar

    Drag And Drop Drag and Drop Platformer Series

    GM Version: GMS2 Target Platform: ALL Download: N/A Links: N/A Summary: A detailed tutorial series on creating a platformer using traditional hsp/vsp collision methods, but implemented in drag and drop. It will eventually cover collision code, states, enemies, basic tiling, parallax scrolling...
  10. E

    GMS 2 Animation not resetting resetting while in the air

    Hello everyone, I'm a wee bit of a newbie at this, so please forgive me any errors. I'm having a problem with changing between states. I'm using Pixelated-Popes animation end code. While the char is on the ground the state switching ( player.attack) working flawlessly, attacks hit...
  11. M

    Legacy GM NPC AI switching states issue

    I have created a switching states code for an NPC in my game that is supposed to: ** wake up when a player is near and move up until the y is in the middle of the screen ** stay idle ** if player gets close enough then follow ** if player gets too close go to idle state But my issue is is...