Skip to content

Scripting Characters

Isaac Laquerre edited this page Feb 23, 2021 · 1 revision

Character Commands

Assing Character to Location

CHARACTER_LOCATION [characterName] [backgroundFileName]

// characterName - Character to be assigned
// backgroundFileName - File name of the PNG background the character is assigned to

Pick Pose for Character

POSE [characterName] [poseFileName]

// characterName - Character whose pose is being assigned
// poseFileName - File name of the PNG pose spritesheet in the /characters/[characterName] folder to use

Play Character Animation

ANIMATION [characterName [animationFileName [speed?]

// characterName - Character whose animation is being played
// animationFileName - File name of the animation to be played. This is not expected to include the "_ani" suffix.
// speed - Optional integer parameter to include how quickly the animation should be layed. Default is 10.

Combining Commands

The above commands are typically used together like the following:

// First, assign Dan to /backgrounds/LOBBY.png
CHARACTER_LOCATION Dan LOBBY

// Next, assign Dan to display the /characters/dan/Normal.png spritesheet the next time we see him
POSE Dan Normal

// Finally, let's go to the lobby, which should now display Dan with the Normal pose
JUMPCUT LOBBY

When utilizing multiple locations, you do not have to re-assign the character locations when jumping between them. For example:

// Assign Dan and Arin different backgrounds
CHARACTER_LOCATION Arin COURT_DEFENSE
CHARACTER_LOCATION Dan COURT_ASSISTANT

// We want Arin to be Embarrassed and Dan to be Happy when we see them
POSE Arin Embarrassed
POSE Dan Happy

JUMPCUT COURT_ASSISTANT
// Dan should say this next like with the HappyTalking.png spritesheet
SPEAK Dan
    "Look at me!"

JUMPCUT COURT_DEFENSE
// Arin should say this next line with the EmbarrassedTalking.png spritesheet
SPEAK Arin
    "No, me!"