Show Character
Show a character's sprite
Description
The character action allows you to display a character's sprite. For other kind of images, take a look at the show image action.
Action ID: Show::Character
Reversible: Yes
Requires User Interaction: No
Properties
These are special properties/classes that can be used when showing a character:
Name | Description |
| Duration affects the |
| With this class, the character will move nicely from one position to another one. |
| Transition affects the |
| When using this property, the provided class will be added to the sprite when it gets changed. |
Examples
Remember every character image must be declared in the characters object.
The animation is completely optional, and if a position is not given, it will show in the center by default.
Exit Animations
New to version 2.0: You can now also set an animation that will play when the character is removed or replaced.
Duration
This is useful if you want to smoothly transition the same character's sprites, such as this example involving crossfades.
The following code will show the character with a fadeIn
animation that will take 20 seconds to complete.
Move + Transition
The following code will show the character positioned at the left side of the string, and then, when it reaches the second line, it will move that character nicely to the right side of the screen. Because of the transition
property being provided, the movement will take 6 seconds to complete.
End Animations
End animations are a way of preparing an animation to happen whenever a sprite gets changed, the following code will show the character first and when it reaches the next line, the character will fade out while the new sprite fades in.
Last updated