So I am trying to make a 4 way movement for my character, and I cant seem to get the walking animations to work for it. The character moves fine, but whenever he moves, the walking animation doesn't play. I figured it was because I made it so when the button was held down, it put it as the sprite for that direction constantly, so it could never get to the next frame. does anyone know how to bypass this? (btw I am using D&D)
\$\begingroup\$
\$\endgroup\$
1
-
\$\begingroup\$ Consider getting into GML over D&D-only system, your issue may be easily solved by writing some code. (You can still use D&D for the same goal, but it'd be harder to write and debug compared to a script) \$\endgroup\$– liggiorgioCommented Dec 28, 2017 at 12:35
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
1
Sounds like you need to set the sprite based on a one-time trigger, like a button press or a similar state change. You can use booleans to keep track of the state of your character, and make sure not to trigger animation changes too often that way. Hope this helps.
-
\$\begingroup\$ This is precisely the issue. The character is changing his sprite every time a button is held down (constantly) so it never has time to animate. The solution is exactly what you say it is. Booleans are not needed here. \$\endgroup\$ Commented Dec 28, 2018 at 5:25