Commands - earok/scorpion-editor-demos GitHub Wiki
Actor
Commands that affect the current actor
Identical commands available for Projectile, Player and New.
Animation / ActorAnimation
Trigger an animation on the entity
//Syntax
ActorAnimation Animation Frame=Expression Loop AutoFlip
//Example
ActorAnimation MyAnimation Frame=1 Loop AutoFlip
- Animation: The animation to play
- Frame: The first frame
- Loop: Loop until cancelled
- AutoFlip: Try to flip the animation left/right automatically if needed
Camera Follow / ActorCameraFollow
Force the camera to follow this specific actor
//Syntax
ActorCameraFollow
//Example
ActorCameraFollow
Child Spawn / ActorSpawnChild
Spawn a child of this actor (use Level category for spawning a new actor)
//Syntax
ActorSpawnChild ActorType
//Example
ActorSpawnChild MyActorType
- ActorType: The type of actor
Direction / ActorDirection
Set the look or movement direction of this entity
//Syntax
ActorDirection Direction
//Example
ActorDirection look_downright
- Direction: Set direction eg look_left, move_right, stop_moving
Freeze / ActorFreeze
Freeze or Unfreeze the actor, preventing movement, collision and animations
//Syntax
ActorFreeze True/False
//Example
ActorFreeze False
- True/False: Only True or False accepted (defaults to True)
Look At Point / ActorLookAt
Look towards a specific point on the level
//Syntax
ActorLookAt X=Expression Y=Expression
//Example
ActorLookAt X=1 Y=1
- X: The X coordinate
- Y: The Y coordinate
Melee / ActorMelee
Do a manually programmed melee box attack
//Syntax
ActorMelee X=Expression Y=Expression Width=Expression Height=Expression
//Example
ActorMelee X=1 Y=1 Width=1 Height=1
- X: The X coordinate
- Y: The Y coordinate
- Width: The box width
- Height: The box height
Origin / ActorOrigin
Change the entity relative position (parent locked)
//Syntax
ActorOrigin X=Expression Y=Expression
//Example
ActorOrigin X=1 Y=1
- X: The X coordinate
- Y: The Y coordinate
Position / ActorPosition
Change the entity position
//Syntax
ActorPosition X=Expression Y=Expression
//Example
ActorPosition X=1 Y=1
- X: The X coordinate
- Y: The Y coordinate
Push / ActorPush
Push this entity a certain amount over a number of frames
//Syntax
ActorPush Frames X=Expression Y=Expression ResetMovement Decay
//Example
ActorPush 5 X=1 Y=1 ResetMovement Decay
- Frames: The number of frames
- X: The X coordinate
- Y: The Y coordinate
- ResetMovement: Resets Actor Movement to new type
- Decay: Smoothly decays push
Render Clearing / ActorNoClear
Enable or disable clearing of an actor's render
//Syntax
ActorNoClear True/False
//Example
ActorNoClear False
- True/False: Only True or False accepted (defaults to True)
Render Mode / ActorRenderMode
Set the rendering mode of this entity
//Syntax
ActorRenderMode RenderMode
//Example
ActorRenderMode RenderMode_Off
- RenderMode: The RenderMode such as rendermode_default, rendermode_off etc
Reset Timer / ActorResetTimer
Reset the entity's timer settings to default, overriding yields
//Syntax
ActorResetTimer
//Example
ActorResetTimer
Schedule Event / ActorScheduleEvent
Trigger a codeblock on this entity after a number of frames
//Syntax
ActorScheduleEvent Label Frames=Expression
//Example
ActorScheduleEvent MyLabel Frames=1
- Label: The label name
- Frames: The number of frames
Separate / ActorSeparate
If overlapping, separate from another actor so they no longer overlap
//Syntax
ActorSeparate ActorClass UseX UseY
//Example
ActorSeparate Player UseX UseY
- ActorClass: The class of actor
- UseX: Use the X Axis
- UseY: Use the Y Axis
Set as NEW / ActorAsNew
Set this actor, or the actor's parent, to NEW
//Syntax
ActorAsNew SetAsNew
//Example
ActorAsNew Parent
- SetAsNew: Set new actor to either SELF or SELF's parent
Set as Player / ActorSelectPlayer
Change PLAYER to the one with a specific controller
//Syntax
ActorSelectPlayer=Expression
//Example
ActorSelectPlayer=5*5
- Expression: The expression such as X+5
Set Controller / ActorController
Override the joystick controller for the actor
//Syntax
ActorController=Expression
//Example
ActorController=5*5
- Expression: The expression such as X+5
Shoot / ActorShoot
Fire an actor
//Syntax
ActorShoot ActorType ShootDirType
//Example
ActorShoot MyActorType aim_at_player
- ActorType: The type of actor
- ShootDirType: The shoot direction type aim_at_player/player_in_front/projectile_direction defaults to actor_direction
Speed / ActorSpeed
Set the exact speed of this entity
//Syntax
ActorSpeed X=Expression Y=Expression Angle=Expression
//Example
ActorSpeed X=1 Y=1 Angle=180
- X: The X coordinate
- Y: The Y coordinate
- Angle: The angle 0-359
Type / ActorType
Change the entity type
//Syntax
ActorType ActorType ResetMovement ResetAnimation
//Example
ActorType MyActorType ResetMovement ResetAnimation
- ActorType: The type of actor
- ResetMovement: Resets Actor Movement to new type
- ResetAnimation: Resets Actor Animation to new type
Yield / ActorYield
Trigger the following code after a number of frames
//Syntax
ActorYield Frames
//Example
ActorYield 5
- Frames: The number of frames
Z Order / ActorZ
Change the rendering 'Z' position of the actor
//Syntax
ActorZ Z
//Example
ActorZ 0
- Z: The Z position
Audio
Commands that affect sound and music
Auto Fade Music / MusicAutoFade
Set whether music fades with screen
//Syntax
MusicAutoFade Expression
//Example
MusicAutoFade 5*5
- Expression: The expression such as X+5
Music Pause / MusicPause
Pause music playback
//Syntax
MusicPause
//Example
MusicPause
Music Position / MusicPos
Set the pattern position of a song
//Syntax
MusicPos MusicPos
//Example
MusicPos 16
- MusicPos: The position in the song (Amiga only)
Music Resume / MusicResume
Resume the music from wherever it left off
//Syntax
MusicResume
//Example
MusicResume
Music Volume / MusicVol
Set the volume of music (0-256)
//Syntax
MusicVol Expression
//Example
MusicVol 5*5
- Expression: The expression such as X+5
Music
Load and play a song
//Syntax
Music Music MusicPos
//Example
Music MySong 16
- Music: The song
- MusicPos: The position in the song (Amiga only)
Play CD Music / MusicCD
Play or stop CD music (or ADPCM-B on NeoGeo)
//Syntax
MusicCD Music
//Example
MusicCD MySong
- Music: The song
Set Music Channels / MusicChannels
Reserve Channels specifically for music
//Syntax
MusicChannels Expression !Bits
//Example
MusicChannels 5*5 !1234
- Expression: The expression such as X+5
- !Bits: The Bits for the music channels - !1234
Sound Volume / SoundVol
Set the volume of sound effects (0-256)
//Syntax
SoundVol Expression
//Example
SoundVol 5*5
- Expression: The expression such as X+5
Sound
Trigger a sound
//Syntax
Sound Sound Period=Expression Volume=Expression
//Example
Sound MySound Period=Period_C Volume=128
- Sound: The sound clip
- Period: The sound period (Amiga)
- Volume: The volume 0-256
Base
Commands for basic and general operations
Advanced
Core Engine functions. Don't use unless you know what you're doing!
//Syntax
Advanced AdvancedCommand
//Example
Advanced MusicResume
- AdvancedCommand: The Advanced Command code
Comment
No action, only used for commenting codeblocks
Execute
Run an AmigaDOS command (use with care)
//Syntax
Execute="Expression"
//Example
Execute="Hello world"
- Expression: A string expression such as "Hello World"
Gosub
Go to another codeblock or label, return to here when return is called
//Syntax
GoSub Label
//Example
GoSub MyLabel
- Label: The label name
Goto
Go to another codeblock or label
//Syntax
Goto Label
//Example
Goto MyLabel
- Label: The label name
Inline
Insert an entire codeblock into this line
//Syntax
Inline Label
//Example
Inline MyLabel
- Label: The label name
Label
Define a point inside a codeblock for goto or gosub commands
//Syntax
Label Label
//Example
Label MyLabel
- Label: The label name
Pop from stack / PopStack
Pop value from stack into variable (ADVANCED)
//Syntax
PopStack VarName
//Example
PopStack MyVariable
- VarName: The variable name
Push to stack / PushStack
Push value on to stack (ADVANCED)
//Syntax
PushStack Expression
//Example
PushStack 5*5
- Expression: The expression such as X+5
Quit
Exit to AmigaDOS or Workbench (set expression to other than 0 to display error code)
//Syntax
Quit="Expression"
//Example
Quit="Hello world"
- Expression: A string expression such as "Hello World"
Return
Return to game (or to the last Gosub)
//Syntax
Return
//Example
Return
Roll Dice / Roll
Generate a random number by simulating a dice roll
//Syntax
Roll Sides MinSide=Expression Into=VarName
//Example
Roll 6 1 Into=MyVar
- Sides: The number of sides on this dice
- MinSide: The minimum size on this dice, all numbers below this will not be returned
- Into: Variable to receive the final Calculation
Schedule Event / Schedule
Trigger a codeblock on this level after a number of frames
//Syntax
Schedule Label Frames
//Example
Schedule MyLabel 5
- Label: The label name
- Frames: The number of frames
Set Variable / Set
Change the value of a variable
//Syntax
Set VarName=Expression
//Example
Set MyVariable=5*5
- VarName: The variable name
- Expression: The expression such as X+5
Wait
Freeze the game for a number of frames
//Syntax
Wait Frames ForFire
//Example
Wait 5 ForFire
- Frames: The number of frames
- ForFire: If this command waits for the user to press fire
Yield On Level / Yield
Continue this codeblock after a number of frames, using level OnTimer
//Syntax
Yield Frames
//Example
Yield 5
- Frames: The number of frames
Conditional
Commands for branching conditions and loops
Condition / If
A standard IF statement
//Syntax
If Conditions
//Example
If 5 > MyVar1 AND 1 < MyVar2
- Conditions: A number of expressions such as X>5 separated by AND or OR
Else If / ElseIf
An IF statmement that only runs if the previous IF was false
//Syntax
ElseIf Conditions
//Example
ElseIf 5 > MyVar1 AND 1 < MyVar2
- Conditions: A number of expressions such as X>5 separated by AND or OR
Else
If the previous IF statement was false, do this instead
//Syntax
Else
//Example
Else
End Condition / End
Close the last open condition
//Syntax
End
//Example
End
For Each Actor / ForEachActor
Execute a codeblock on each actor of type (or all actors)
//Syntax
ForEachActor Conditions Goto Label
//Example
ForEachActor 5 > MyVar1 AND 1 < MyVar2 MyLabel
- Conditions: A number of expressions such as X>5 separated by AND or OR
- Goto: The Destination Label
For
Execute a variable loop
//Syntax
For VarName From Expression To=Expression Step=Expression
//Example
For MyVariableFrom 5 10 1
- VarName: The variable name
- From: From this..
- To: ...To this
- Step: The steps size (eg 2 means skip every other number)
While
Loop this condition while the IF statement is true
//Syntax
While Conditions
//Example
While 5 > MyVar1 AND 1 < MyVar2
- Conditions: A number of expressions such as X>5 separated by AND or OR
Controls
Commands that affect controls
Attack Controls / AttackControls
Change the attack button and autofire settings
//Syntax
AttackControls PlayerId !Bits
//Example
AttackControls Player1 !1
- PlayerId: The player Id such as Player1/2/3/4 or just Player for the current active Player
- !Bits: The Bits for the attack control operation - !UDLR12345678XYSA
Boost Acceleration / BoostAccel
Boost a controlled actor's acceleration
//Syntax
BoostAccel PlayerId L=Expression R=Expression U=Expression D=Expression
//Example
BoostAccel Player1 L=1 R=1 U=1 D=1
- PlayerId: The player Id such as Player1/2/3/4 or just Player for the current active Player
- L: The Left setting
- R: The Right setting
- U: The Up setting
- D: The Down setting
Boost / BoostSpeed
Boost a controlled actor's top speed
//Syntax
BoostSpeed PlayerId L=Expression R=Expression U=Expression D=Expression
//Example
BoostSpeed Player1 L=1 R=1 U=1 D=1
- PlayerId: The player Id such as Player1/2/3/4 or just Player for the current active Player
- L: The Left setting
- R: The Right setting
- U: The Up setting
- D: The Down setting
Control Mode / ControlMode
Change the number/type of active controllers
//Syntax
ControlMode ControlMode
//Example
ControlMode Joys_1
- ControlMode: The control mode such as joys_1, joys_2
Jump Controls / JumpControls
Change the jump button and behavior settings
//Syntax
JumpControls PlayerId !Bits
//Example
JumpControls Player1 !U2
- PlayerId: The player Id such as Player1/2/3/4 or just Player for the current active Player
- !Bits: The Bits for the jump control operation - !UDLR12345678JNFH
Strafe Controls / StrafeControls
Change which buttons implement strafe
//Syntax
StrafeControls PlayerId !Bits
//Example
StrafeControls Player1 !1
- PlayerId: The player Id such as Player1/2/3/4 or just Player for the current active Player
- !Bits: The Bits for the attack control operation - !UDLR12345678XYSA
Data
Commands that affect data, such as loading and saving
Data Load / Load
Load variables from disk. Check Success variable for result
//Syntax
Load Label Expression
//Example
Load MyLabel 5*5
- Label: The label name
- Expression: The expression such as X+5
Data Save / Save
Save variables to disk. Check Success variable for result
//Syntax
Save Label Expression
//Example
Save MyLabel 5*5
- Label: The label name
- Expression: The expression such as X+5
String Clear / StringClear
Clear an entire string
//Syntax
StringClear VarName
//Example
StringClear MyVariable
- VarName: The variable name
String Replace / StringSet
Replace an entire string with another string
//Syntax
StringSet VarName="Expression"
//Example
StringSet MyVariable="Hello world"
- VarName: The variable name
- Expression: A string expression such as "Hello World"
String Set Character / StringSetChar
Change any of the characters on a string (using ASCII codes)
//Syntax
StringSetChar VarName[Index]=Expression
//Example
StringSetChar MyVariable[10]=5*5
- VarName: The variable name
- Index: The array size or offset
- Expression: The expression such as X+5
Dialogue
Commands for displaying text
Choice
Configure a dialogue option for the player
//Syntax
Choice "Expression" Label Conditions
//Example
Choice "Hello world" MyLabel 5 > MyVar1 AND 1 < MyVar2
- Expression: A string expression such as "Hello World"
- Label: The label name
- Conditions: A number of expressions such as X>5 separated by AND or OR
Print text to a panel
//Syntax
Print "Expression" PanelSlot Padding=Expression
//Example
Print "Hello world" Middle 10
- Expression: A string expression such as "Hello World"
- PanelSlot: The Panel slot such as Middle
- Padding: The minimum amount of padding on this string
Speak Delay / SpeakDelay
Set how long it takes each character to be printed
//Syntax
SpeakDelay Expression
//Example
SpeakDelay 5*5
- Expression: The expression such as X+5
Speak / Say
Print a line of dialogue to the talkpad
//Syntax
Say "Expression" Frames=Expression ForFire
//Example
Say "Hello world" Frames=1 ForFire
- Expression: A string expression such as "Hello World"
- Frames: The number of frames
- ForFire: If this command waits for the user to press fire
Display
Commands that affect the resolution, screen and panels
Blink Time / BlinkTime
Set the Blinking Time for RenderMode_Blink etc
//Syntax
BlinkTime Expression
//Example
BlinkTime 5*5
- Expression: The expression such as X+5
Camera Bounds / CameraBounds
Change Left/Right/Up/Down bounds of the camera
//Syntax
CameraBounds L=Expression R=Expression U=Expression D=Expression
//Example
CameraBounds L=1 R=1 U=1 D=1
- L: The Left setting
- R: The Right setting
- U: The Up setting
- D: The Down setting
Camera Box / CameraBox
Change the distance of the player from the camera center
//Syntax
CameraBox L=Expression R=Expression U=Expression D=Expression LookL=Expression LookR=Expression LookU=Expression LookD=Expression
//Example
CameraBox L=1 R=1 U=1 D=1 LookL=1 LookR=1 LookU=1 LookD=1
- L: The Left setting
- R: The Right setting
- U: The Up setting
- D: The Down setting
- LookL: The Look Left setting
- LookR: The Look Right setting
- LookU: The Look Up setting
- LookD: The Look Down setting
Camera Follow / CameraFollow
Change how the camera follows the player
//Syntax
CameraFollow !Bits Snap MaxCamera=Expression Smooth
//Example
CameraFollow !UDLR Snap MaxCamera=1 Low
- !Bits: The Bits for the camera follow operation - !LRUDCS
- Snap: Snap the Camera Position
- MaxCamera: The max camera speed
- Smooth: The smoothing type None to Max
Camera Position / CameraPosition
Change where the camera is
//Syntax
CameraPosition X=Expression Y=Expression Center ResetMovement Warp Fast
//Example
CameraPosition X=1 Y=1 Center ResetMovement Warp Fast
- X: The X coordinate
- Y: The Y coordinate
- Center: Center position
- ResetMovement: Resets Actor Movement to new type
- Warp: Warp actors
- Fast: Fast setting
Camera Scroll / ScrollSpeed
Set how fast the camera auto scrolls in X and Y
//Syntax
ScrollSpeed X=Expression Y=Expression ResetMovement
//Example
ScrollSpeed X=1 Y=1 ResetMovement
- X: The X coordinate
- Y: The Y coordinate
- ResetMovement: Resets Actor Movement to new type
Column Scroll / ScrollColumn
ADVANCED Mega Drive only. Requires Set Screen command to enable
//Syntax
ScrollColumn Expression Index=Expression BG
//Example
ScrollColumn 5*5 10 BG
- Expression: The expression such as X+5
- Index: The index for this operation
- BG: Use the background layer
Configure Screen / Screen
Set Y Resolution, refresh rate, screen wrap mode etc
//Syntax
Screen Y=Expression Height=Expression Frames=Expression AGASpriteWrap NoAGASpriteWrap ColumnScroll NoColumnScroll
//Example
Screen Y=1 Height=1 Frames=1 AGASpriteWrap NoAGASpriteWrap ColumnScroll NoColumnScroll
- Y: The Y coordinate
- Height: The box height
- Frames: The number of frames
- AGASpriteWrap: Enable Amiga AGA sprite wrap
- NoAGASpriteWrap: Disable Amiga AGA sprite wrap
- ColumnScroll: Enable Mega Drive column scroll
- NoColumnScroll: Disable Mega Drive column scroll
Panel Bottom / PanelBottom
Change the panel on bottom
//Syntax
PanelBottom PanelBottom
//Example
PanelBottom MyPanel
- PanelBottom: The main full-screen panel
Panel Special / PanelSpecial
Change the 32X panel OR Amiga Sprite Panel
//Syntax
PanelSpecial PanelSpecial
//Example
PanelSpecial MyPanel
- Panel: The special panel
Panel Top / PanelTop
Change the panel on top
//Syntax
PanelTop PanelTop
//Example
PanelTop MyPanel
- PanelTop: The main full-screen panel
Panel
Change the panel on the main display
//Syntax
Panel Panel Music=Expression MusicPos=Expression PanelTop=Expression PanelBottom=Expression Frames=Expression ForFire NoLevelUnload
//Example
Panel MyPanel Music=MyMusic MusicPos=1 PanelTop=MyTopPanel PanelBottom=MyBottomPanel Frames=1 ForFire NoLevelUnload
- Panel: The main full-screen panel
- Music: The music to load
- MusicPos: The position to start the music from (Protracker)
- PanelTop: The top panel to load
- PanelBottom: The bottom panel to load
- Frames: The number of frames
- ForFire: If this command waits for the user to press fire
- NoLevelUnload: Keep level loaded in the background
Parallax Pointer / ParallaxPointer
Set the variable that controls parallax (default is Camera_X)
//Syntax
ParallaxPointer XVar=VarName YVar=VarName
//Example
ParallaxPointer MyXVar MyYVar
- XVar: Variable to receive the X Calculation
- YVar: Variable to receive the Y Calculation
Parallax Scroll / ScrollParallax
Manually set the offset of a slice of a parallax setup
//Syntax
ScrollParallax Expression Y=Expression
//Example
ScrollParallax 5*5 Y=1
- Expression: The expression such as X+5
- Y: The Y coordinate
Talkpad
Set the talkpad, needed for Say command
//Syntax
Talkpad Panel
//Example
Talkpad MyPanel
- Panel: The main full-screen panel
Level
Commands for loading or affecting the current level
Asset Bundle / Bundle
Load or unload an asset bundle (ADVANCED)
//Syntax
Bundle True/False Expression
//Example
Bundle False 5*5
- True/False: Only True or False accepted (defaults to True)
- Expression: The expression such as X+5
Background
Replace the current background with another one
//Syntax
Background Background
//Example
Background MyBackground
- Background: The background to load
Block Count / CountBlock
Count the number of blocks of a type in the level
//Syntax
CountBlock Block VarName
//Example
CountBlock MyBlock MyVariable
- Block: The block to set
- VarName: The variable name
Block Find / FindBlock
Find the next block of a type, updating block_x/block_y if any matches
//Syntax
FindBlock Block
//Example
FindBlock MyBlock
- Block: The block to set
Block Get by Pixel / GetBlockAtPixel
Get the block on pixel coordinates location
//Syntax
GetBlockAtPixel VarName X=Expression Y=Expression PixelPerfect
//Example
GetBlockAtPixel MyVariable X=1 Y=1 PixelPerfect
- VarName: The variable name
- X: The X coordinate
- Y: The Y coordinate
- PixelPerfect: Pixel Perfect block detection
Block Get / GetBlock
Get the block on tile coordinates location
//Syntax
GetBlock VarName X=Expression Y=Expression
//Example
GetBlock MyVariable X=1 Y=1
- VarName: The variable name
- X: The X coordinate
- Y: The Y coordinate
Block Set / SetBlock
Change the block in a specific location
//Syntax
SetBlock Block X=Expression Y=Expression
//Example
SetBlock MyBlock X=1 Y=1
- Block: The block to set
- X: The X coordinate
- Y: The Y coordinate
Block Spawn / SpawnOnBlock
Spawn an actor on a block
//Syntax
SpawnOnBlock ActorType X=Expression Y=Expression
//Example
SpawnOnBlock MyActorType X=1 Y=1
- ActorType: The type of actor
- X: The X coordinate
- Y: The Y coordinate
Level
Load and run a new level
//Syntax
Level Level Music=Expression MusicPos=Expression PanelTop=Expression PanelBottom=Expression Background=Expression NoFadeIn
//Example
Level MyLevel Music=MyMusic MusicPos=1 PanelTop=MyTopPanel PanelBottom=MyBottomPanel PanelBackground=MyBottomPanel NoFadeIn
- Level: The Level to load
- Music: The music to load
- MusicPos: The position to start the music from (Protracker)
- PanelTop: The top panel to load
- PanelBottom: The bottom panel to load
- Background: The background to load
- NoFadeIn: Prevent automatic fade in
Spawn Actor / Spawn
Spawn an actor in the level
//Syntax
Spawn ActorType X=Expression Y=Expression
//Example
Spawn MyActorType X=1 Y=1
- ActorType: The type of actor
- X: The X coordinate
- Y: The Y coordinate
Teleport to / Teleport
Teleport to a specific teleporter configured in any map
//Syntax
Teleport Teleport
//Example
Teleport TeleporterName
- Teleport: Teleport the player to this teleporter
Tile Properties Get / GetTileProperties
Get the tile properties on tile coordinates location
//Syntax
GetTileProperties VarName X=Expression Y=Expression
//Example
GetTileProperties MyVariable X=1 Y=1
- VarName: The variable name
- X: The X coordinate
- Y: The Y coordinate
Tile Properties Set / SetTileProperty
Set the property of a tile
//Syntax
SetTileProperty True/False TileProperty X=Expression Y=Expression
//Example
SetTileProperty False Solid X=1 Y=1
- True/False: Only True or False accepted (defaults to True)
- Tile Property: The tile property such as Solid, Platform, Spare or AIBlock
- X: The X coordinate
- Y: The Y coordinate
Maths
Commands for mathematics
Absolute
Convert an expression, if negative, to positive
//Syntax
Absolute VarName=Expression
//Example
Absolute MyVariable=5*5
- VarName: The variable name
- Expression: The expression such as X+5
Angle / Rotate
Rotate a value by a direction, and put the resulting value into two expressions
//Syntax
Rotate Expression X=Expression Y=Expression XVar=VarName YVar=VarName
//Example
Rotate 5*5 X=1 Y=1 MyXVar MyYVar
- Expression: The expression such as X+5
- X: The X coordinate
- Y: The Y coordinate
- XVar: Variable to receive the X Calculation
- YVar: Variable to receive the Y Calculation
ATan2
Get a 0-359 degree direction from X and Y
//Syntax
Atan2 VarName X=Expression Y=Expression
//Example
Atan2 MyVariable X=1 Y=1
- VarName: The variable name
- X: The X coordinate
- Y: The Y coordinate
Distance (Exact - Slow) / DistanceExact
Calculate the direct distance between two points
//Syntax
DistanceExact VarName X1=Expression Y1=Expression X2=Expression Y2=Expression
//Example
DistanceExact MyVariable X1=1 Y1=1 X2=1 Y2=1
- VarName: The variable name
- X1: The first X coordinate
- Y1: The first Y coordinate
- X2: The second X coordinate
- Y2: The second Y coordinate
Distance (Manhattan - Fast) / DistanceManhattan
Calculate the manhattan distance between two points
//Syntax
DistanceManhattan VarName X1=Expression Y1=Expression X2=Expression Y2=Expression
//Example
DistanceManhattan MyVariable X1=1 Y1=1 X2=1 Y2=1
- VarName: The variable name
- X1: The first X coordinate
- Y1: The first Y coordinate
- X2: The second X coordinate
- Y2: The second Y coordinate
Square Root / SquareRoot
Calculate the square root of an expression
//Syntax
SquareRoot VarName=Expression
//Example
SquareRoot MyVariable=5*5
- VarName: The variable name
- Expression: The expression such as X+5
Palette
Commands that allow for fades and palette manipulation
Color Read / ReadColor
Load the original color of a palette index into RED, GREEN, BLUE
//Syntax
ReadColor ColorIndex
//Example
ReadColor 0
- ColorIndex: The index on the palette
Color Reset / ResetColor
Reset the color of a palette index to the original value
//Syntax
ResetColor ColorIndex
//Example
ResetColor 0
- ColorIndex: The index on the palette
Color Set / SetColor
Change the color of a palette index
//Syntax
SetColor ColorIndex Color Fast
//Example
SetColor 0 #FF0000 Fast
- ColorIndex: The index on the palette
- Color: The color in #RRGGBB hex format
- Fast: Fast setting
Color Write / WriteColor
Save a new color from RED, GREEN, BLUE into the palette
//Syntax
WriteColor ColorIndex Fast
//Example
WriteColor 0 Fast
- ColorIndex: The index on the palette
- Fast: Fast setting
Fade In / FadeIn
Fade the screen in from black
//Syntax
FadeIn
//Example
FadeIn
Fade Out / FadeOut
Fade the screen out to black
//Syntax
FadeOut
//Example
FadeOut
Fade Time / FadeTime
Set how many frames it takes to fade in/out a level
//Syntax
FadeTime Frames
//Example
FadeTime 5
- Frames: The number of frames
Palette Read / PaletteRead
Read a single color from a PNG into RED, GREEN and BLUE
//Syntax
PaletteRead "FileName" PaletteFrom
//Example
PaletteRead "MyFile.txt" 0
- FileName: The relative file path
- PaletteFrom: The source index of the palette operation
Palette Set / PaletteSet
Set a range of colors from a PNG
//Syntax
PaletteSet "FileName" PaletteFrom PaletteTo PaletteCount
//Example
PaletteSet "MyFile.txt" 0 0 16
- FileName: The relative file path
- PaletteFrom: The source index of the palette operation
- PaletteTo: The destination index of the palette operation
- PaletteCount: The total number of colors to transfer
Palette Swap / PaletteSwap
Change the index of a color on all frames of an animation
//Syntax
PaletteSwap Animation Expression Expression
//Example
PaletteSwap MyAnimation 0 0
- Animation: The animation to play
- From: From this..
- To: ..To this
Variables and Constants
Declare a variable value
Alias
Add an alternative name for another variable e.g. actor_health = actor_var1
//Syntax
Alias VarName=Expression
//Example
Alias MyVariable=5*5
- VarName: The variable name
- Expression: The expression such as X+5
Array
Reserve empty space in memory. Value field contains the length
//Syntax
Array Size VarName[Index]
//Example
Array Word MyVariable[10]
- Size: The variable size in Byte/Word/Long/Fraction
- VarName: The variable name
- Index: The array size or offset
Constant
An unchangable number. Value field contains the hard coded value.
//Syntax
Constant VarName=Expression
//Example
Constant MyVariable=5*5
- VarName: The variable name
- Expression: The expression such as X+5
Hardware Register / HardwareRegister
ADVANCED. Peek or poke the bare metal.
//Syntax
HardwareRegister Size VarName=Expression
//Example
HardwareRegister Word MyVariable=5*5
- Size: The variable size in Byte/Word/Long/Fraction
- VarName: The variable name
- Expression: The expression such as X+5
LookUpTable
Array that reads from a text file with one constant per line. Read only.
//Syntax
LookupTable Size VarName "FileName"
//Example
LookupTable Word MyVariable "MyFile.txt"
- Size: The variable size in Byte/Word/Long/Fraction
- VarName: The variable name
- FileName: The relative file path
String
A set of ASCII characters. Value field contains the initial value (length cannot be changed)
//Syntax
String VarName="Expression"
//Example
String MyVariable="Hello world"
- VarName: The variable name
- Expression: A string expression such as "Hello World"
Variable
A changeable number. Value field contains the default value.
//Syntax
Variable Size VarName=Expression
//Example
Variable Word MyVariable=5*5
- Size: The variable size in Byte/Word/Long/Fraction
- VarName: The variable name
- Expression: The expression such as X+5