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/Update Character

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

Syntax:

<<set_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:

<<set_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.

<<set_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.

<<set_char "Sarah" "emotion:nervous;pos:left;face:right">>
<<set_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.

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.