Skip to main content

Characters

These are special commands created specifically for your interactive story app. They control characters, backgrounds, and other visual elements.

Show Character

Displays a character sprite on the screen with a specific emotion and position.

Syntax:

<<show_char "[CharacterName]" "emotion:[Emotion];pos:[Position];face:[Direction]">>

Parameters:

ParameterTypeOptionsDescription
CharacterNametextany character nameThe character you want to show
Emotiontextany emotion stateWhat emotion the character displays (like "happy", "sad", "angry")
Positiontext"left", "right", or "center"Which side of the screen the character appears on
Directiontext"left" or "right"Which direction the character is facing

How it finds the sprite: The command automatically looks for an image named charactername_emotion (all lowercase). For example, <<show_char "Alice" "emotion:smile;pos:left;face:right">> will change to the sprite named alice_smile.

Examples:

<<show_char "Alice" "emotion:happy;pos:left;face:right">>
Alice: Good morning! How are you today?

Shows Alice on the left side of the screen using the alice_happy sprite, facing toward the right.

<<show_char "Bob" "emotion:angry;pos:right;face:left">>
Bob: I can't believe you did that!

Shows Bob on the right side using the bob_angry sprite, facing toward the left.

<<show_char "Sarah" "emotion:nervous;pos:left;face:right">>
<<show_char "Marcus" "emotion:smile;pos:right;face:left">>
Sarah: Um... I have something to tell you.
Marcus: What is it?

Shows both characters on opposite sides: sarah_nervous on the left and marcus_smile on the right, facing each other.

Update Character

Changes an existing character's emotion or position without removing them from the screen first[web:5].

Syntax:

<<update_char "[CharacterName]" "emotion:[Emotion];pos:[Position];face:[Direction]">>

Parameters:

ParameterTypeOptionsDescription
CharacterNametextany character nameThe character you want to update
Emotiontextany emotion stateThe new emotion to show
Positiontext"left", "right", or "center"Where to move the character (or keep them)
Directiontext"left" or "right"Which direction the character should face

How it finds the sprite: The command automatically looks for an image named charactername_emotion (all lowercase). For example, <<update_char "Alice" "emotion:smile;pos:left;face:right">> will change to the sprite named alice_smile.

Examples:

<<show_char "Alice" "emotion:neutral;pos:left;face:right">>
Alice: I have good news!
<<update_char "Alice" "emotion:happy;pos:left;face:right">>
Alice: I got the job!

Alice starts with the alice_neutral sprite, then switches to alice_happy when sharing the good news.

<<show_char "Bob" "emotion:angry;pos:right;face:left">>
Bob: This is unacceptable!
<<wait 1>>
<<update_char "Bob" "emotion:sad;pos:right;face:left">>
Bob: I'm just... disappointed.

Bob's sprite changes from bob_angry to bob_sad, showing a shift in mood.

<<show_char "Emma" "emotion:smile;pos:left;face:right">>
Emma: Let me think about that.
<<update_char "Emma" "emotion:smile;pos:right;face:left">>
Emma: Okay, I've decided!

Emma keeps the emma_smile sprite but moves from the left side to the right side.

Hide Character

Removes a character from the screen.

Syntax:

<<hide_char "[CharacterName]">>

Parameters:

ParameterTypeDescription
CharacterNametextThe character you want to remove from the scene

Examples:

<<show_char "Alice" "happy" "pos:left;face:right">>
Alice: I have to go now. See you later!
<<hide_char "Alice">>
Narrator: Alice left the room.

Alice appears on screen, says goodbye, then disappears.

<<show_char "Tom" "neutral" "pos:left;face:right">>
<<show_char "Jerry" "smile" "pos:right;face:left">>
Tom: I'm heading out.
<<hide_char "Tom">>
Jerry: Finally, some peace and quiet!

Tom leaves the conversation while Jerry stays on screen.

Image suggestion: Simple diagram showing a character sprite fading out or disappearing from the game screen.