Skip to content
trulyElse edited this page Oct 1, 2012 · 18 revisions

An action at its most basic level is a command and its parameters. When used in an <action> tag, the quotation marks should not be written.

Table of Contents

Supported Commands

talk

Activates a dialog. It takes one parameter that is a series of dialogs.

The syntax for this is specified on the dialog page.

randomTalk

Activates a dialog. It takes one parameter that is a series of dialogs.

The syntax for this is specified on the dialog page.

changeRoom

Changes the current room to the specified room, and moves the character to it.

Syntax: "newRoom,newX,newY"

changeRoomRemote

Changes the current room, to the specified room, and moves the character to it. If the specified SburbML file, which presumably contains the room being referenced, is not loaded yet, loads it first.

Syntax: "file,newRoom,newX,newY"

playAnimation

Have the target sprite play the specified animation.

Syntax: "sprite,animation"

This command also supports "char" in place of "sprite" to play this animation on the player.

changeChar

Change the player's character to the one specified. Also changes the room to the one in which the new character is standing.

Syntax: "sprite"

changeFocus

Change the sprite the camera is focusing on.

Syntax: "sprite"

playSong

Make the specified audio asset play as the background music.

Syntax: "song"

playSound

Make the specified audio asset play as a sound effect.

Syntax: "sound"

teleport

Calls the changeRoom command, and applies transportalizer effects.

Syntax: changeRoom's syntax.

teleportRemote

Calls the changeRoomRemote command, and applies transportalizer effects.

Syntax: changeRoomRemote's syntax.

playEffect

Play the specified effect at the specified location.

Syntax: "effect,x,y"

openChest

Open the specified chest, display the specified sprite as its contents, and a message.

Syntax: "chest,sprite,message"

waitFor

Take away player control, and wait for the specified trigger.

Syntax: see trigger syntax

deltaSprite

Move the sprite from it's current position by the specified amount in pixels.

Syntax: "sprite,dx,dy"

moveSprite

Move the sprite to the specified location in pixels.

Sytnax: "sprite,x,y"

addSprite

Add the specified sprite to the specified room. Warning: if this sprite is in another room, it will now be in both!

Syntax: "sprite,room"

removeSprite

Remove the specified sprite from the specified room. Even if a sprite isn't physically present anywhere, it can still be referenced by name.

Syntax: "spriteName, roomName"

playMovie

Play the specified movie asset.

Syntax: "movieName"

removeMovie

Stops the specified movie asset.

(utility function used internally, not recommended for explicit use)

Syntax: "movieName"

toggleVolume

Toggle the volume level (100->0->33->66->100). Used by the volume button.

Sytnax: takes no parameters

addAction[s]

Add the given actions to a sprite.

Syntax: SburbML Action Sytax

removeAction[s]

Remove the given actions from a sprite

Syntax: spriteName, actionName, actionName, actionName, ... Note: Non-determinism may arise if multiple actions have the same name!

presentAction[s]

Present the given actions to the user as a set of choices. Note that unlike normal, is not assumed to be a choice.

Syntax: SburbML Action Sytax

addWalkable

Add the specified path as a walkable to the specified room

syntax: pathName, roomName

addUnwalkable

Add the specified path as an unwalkable to the specified room

syntax: pathName, roomName

addMotionPath

Add the specified path as a motionpath to the specified room syntax: pathName, xtox, xtoy, ytox, ytoy, dx, dy, roomName

removeWalkable

Remove the specified walkable from the specified room syntax: pathName, roomName

removeUnwalkable

Remove the specified unwalkable from the specified room syntax: pathName, roomName

loadStateFile

load in an additional SBURBML file syntax: path, keepOld

fadeOut

fade out to black syntax: none

setButtonState

Change the state of the specified button syntax: buttonName, state

skipDialog

Skip the current conversation syntax: none

follow

Set a character to follow another character syntax: followerName, leaderName

unfollow

Set a character to stop following another character syntax: followerName

addOverlay

Overlay a sprite over the game area (below the HUD) syntax: spriteName commands.

removeOverlay

Remove an overlay syntax: spriteName

cancel

Takes no parameters, does nothing.