How do change the sprite when entering Area2D? #352
Answered
by
DimensionWarped
MasterGlitcher2006
asked this question in
Q&A
-
|
How do I change a character's sprite when it enters an Area2D (for example, so that the character's sprite looks sad/scared/angry/bored)? |
Beta Was this translation helpful? Give feedback.
Answered by
DimensionWarped
May 1, 2026
Replies: 1 comment 1 reply
-
|
I think it's pretty easy, bruh.. just change the player's state to the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a pretty good early explanation, but let's back up a little since we don't know yet where MasterGlitcher is in the process or what his exact intentions are.
@MasterGlitcher2006
Is your intention simply to have the player stand still and play an animation of the character frowning/smiling/scowling/falling sleep for a little bit before resuming? Is this sprite change already set up in your animation player?
If so, Quartz is spot on. You'd most likely write a script to change the player's animation to whatever the name of the animation you are wanting is after changing the player's state to animation/gimmick (depending on your branch). Then either after a certain time interval or aft…