Skip to content

u/OriginalPolicy

In this archive from Mar 2019 to Jul 2022

1
posts
7
comments
0
media
16
score

Add a property called 'state' to your character. On each process, check what the character is currently doing and set the state to "moving" or "attacking" or "idle". You can also set this state with events, like your attack function. Have an if else block at the end that checks what state the character is in, and plays the appropriate animation.

6 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.