This at least reduces the need for adding way more than you need to any if else statements and does away with having a billion flags. Though it would mean you can only move AFTER you're done attacking. In this way, you can't move while attacking, even if you tried. In your case it'd probably look a little like: While jumping (jump state) you can only move left and right, which removes the ability to jump and duck while in midair. Check out this animation tutorial, itll help you understand. When you press a key / when not pressing a key: spriteindex spragentwhatever. Stop an animation GameMaker Community Hello everyone The forum recently had a major server issue which prevented people from posting. So while standing (stand state) you can only walk, jump and duck. I dont need to show me how to make the movements but the animations. However, finite state machines work in a way where when you're in a "state" only on pressing of certain keys, does your avatar/character perform an action. Might I suggest looking into Finite State Machines? I came across it the other day and I thought it interesting because for every action you add, more bugs require squashing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |