Monogatari Documentation
HomepageGitHubDiscordTwitter
v2.0.0
v2.0.0
  • Welcome
  • Getting Started
    • Step 1: Setup Your Environment
    • Step 2: Download Monogatari
    • Step 3: Get Familiarized
    • Step 4: Make Your First Visual Novel
  • Upgrading from v1.4.1
  • F.A.Q.
  • Diagnosing Errors
  • Building Blocks
    • Script & Labels
    • Characters
    • Variables & Data Storage
    • Actions
      • Life Cycle
    • Components
      • Life Cycle
      • Built-in Properties
      • Built-in Functions
  • Script Actions
    • Choices
    • Clear
    • Conditionals
    • Dialogs
    • End
    • Gallery
    • Hide Canvas
    • Hide Character
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Image
    • Show Message
    • Show Notification
    • Show Particles
    • Show Scene
    • Show Video
    • Stop Music
    • Stop Sound
    • Stop Voice
    • Vibrate
    • Wait
  • Components
    • Credits Screen
    • Quick Menu
    • Loading Screen
    • Main Screen
    • Choice Container
    • Save Slot
    • Text-Box
  • Configuration Options
    • Game Configuration
      • Asset Preloading
      • Internationalization
      • Saving
      • Skip Main Menu
      • Storage
    • Player Preferences
    • Split Files
  • Style & Design
    • Responsiveness
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Releasing Your Game
    • Chrome App
    • Desktop App
    • Mobile
    • Web
  • Advanced: Monogatari Development
    • Core Libraries
      • Artemis
      • Kayros
      • Pandora
    • Actions
    • Components
    • Translations
    • Events
  • Releases
    • v2.0.0.alpha.8
    • v2.0.0.alpha.7
    • v2.0.0.alpha.6
    • v2.0.0.alpha.5
    • v2.0.0.alpha.4
    • v2.0.0.alpha.3
Powered by GitBook
On this page
  • Description
  • Properties
  • Examples
  • Exit Animations
  • Duration
  • End Animations

Was this helpful?

  1. Script Actions

Show Character

Show a character's sprite

PreviousShow BackgroundNextShow Image

Last updated 4 years ago

Was this helpful?

Description

'show character <character_id> <sprite_id> [at [class]] [with [animations] [classes] [properties]]'

The character action allows you to display a character's sprite. For other kind of images, take a look at the .

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

Duration affects the animation-duration CSS property so you can change the duration of any animations applied to the character.

move

With this class, the character will move nicely from one position to another one.

transition

Transition affects the transition-duration CSS property so you can change the duration of the transition for the move class.

end-<className>

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.

'show character e normal at center with fadeIn',
'show character e normal',
'show character e normal with fadeIn',

Exit Animations

New to version 2.0: You can now also set an animation that will play when the character is removed or replaced.

show character <character_id> <sprite_id> [at [class]] [with [animation] [end-[animation]] [classes]]

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.

	"Hello",
	"show character s Normal at center with fadeIn end-fadeOut",
	"s Hi theeeeere.",
	"show character s Happy at center with fadeIn end-fadeOut",
	"I'm happy now, and my smile just faded onto my face.",
	"show character s Normal at center with fadeIn",
	"Normal."
'show character e normal with fadeIn duration 20s'

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.

'show character e normal with end-fadeOut',
'show character e happy with fadeIn'

The is completely optional, and if a position is not given, it will show in the center by default.

show image action
animation