Skip to content

Editor: Script Commands

HunterwolfAT edited this page Sep 13, 2012 · 3 revisions

<== Back to the Overview

The Scripts in ArtistQuest work pretty much as you would expect them to. You add lines of Commands to them by using the interface at the bottom of the Script-Tab.

The General Tab

Editor Commands General

Message

Syntax: Message: *Text*

Example: Message: Hey you, I thought I told you to not show your stupid ass around here anymore!

Puts up a Message Box with the Text rolling in. The Script will only continue when the player pressed Enter.

Screen Fade

Syntax: Screenfade: OUT Screenfade: IN

Makes the entire screen fade to black. The Script will only continue once the fading is complete.


Fading out in one Room, then calling a Teleport, then Fading in, doesn't work because Scripts will discontinue once a new Room is loaded!


Teleport

Syntax: Teleport: *Destination* *XPos* *YPos*

Example: Teleport: Kitchen 340 200

Loads a new Room that is called Destination and puts the Player at the specified coordinates.

Wait

Syntax: Wait: *Time*

Example: Wait: 3000

Waits the specified number of milliseconds before continuing the Script.

Make Player Invisible/Visible

Syntax: Turn Player Visible: Turn Player Invisible

Enables/Disables the sprite of the Player.

Add END SCRIPT

Syntax: END SCRIPT:

Stops the ScriptHandler right there -- the Script will stop executing.

The Obj Stats Tab

Editor - Commands - Obj Stats Tab

Change Sprite

Syntax: ChangeSprite: *Object* *ImageNumber*

Example: ChangeSprite: Hallway Door 2

Changes the Sprite of the specified Object to the specified Sprite.


Sprites of Objects can be modified at the Object Tab.


Play Animation

Syntax: Play Animation: *Object* *Animation* once|start|stop

Choose an Object as destination, a Animation and whether it should play once, keep playing in a loop, or stop it entirely.

Move Object (or Player)

Syntax: Move Object: *Object* wait|dont wait *deltaX* *deltaY* *speed*

Example: Move Object: Television wait 30 10 2

Moves the mentioned Object the specified way in X and Y with a speed of speed per update. If it is set to wait, the Script won't continue unless the target has reached it's destination.

Move Player

Syntax: Move Object: *PLAYER wait|dont wait with|no animation *deltaX* *deltaY* *speed*

Moves the Player, just like an Object. You can also specify whether it should play the walk-animation while moving, or not.

Fade Object in/out

Syntax: Fade Object: *Object* in|out wait|dont wait *speed*

Example: Fade Object: Table out dont wait 2

Fades Objects in and out and sets their Visible attribute to the respective value at the end. Set Wait until done if you don't want the Script to continue while the fade is still in progress.

Set Walkable/Visibility

Syntax: Change Walkable: *Object* ON|OFF Change Visibile: *Object* ON|OFF

Changes the Attribute of the Object Object to what it says.

Set Verbs active/inactive

Syntax: Change verb: *Object* *Verb* ON|OFF

Changes the Active attribute of the Verb of Object to either true or false.

The Conditions Tab

Editor - Commands - Conditions

IF-Statements

IF-Statements in ArtistQuest look like this:

IF: Variablecheck HallwayDoorUsable EQUAL \false
    IF: Itemcheck hexagon key is not in inventory
       Message: ?! I.... I can't!
    ELSE:
       Message: I could you the hexagon key on this side too.
    END IF:
 ELSE:
    Message: Yes! I did it!
    Teleport: Hallway 250 250
 END IF:

IF-Clauses always end with a END IF!


Create a IF-Command

Either select a Global Variable from the upper listbox, or a Item from the lower listbox.

Check against a Global Variable

Select a Operator from the IS-listbox:

  • EQUAL (==)
  • NEQUAL (!=)
  • BIGGER (>)
  • SMALLER (<)

Finally, select either another Global Variable from the AS-listbox, or insert a value yourself below the listbox and click Add Condition Command.

Check for the Item

Select either in player inventory or NOT in pl. inventory and click Add Condition Command.

Add a ELSE

Click Add ELSE branch.

Add END IF

Click Add END IF.

The Game Stats Tab

Editor - Commands - Game Stats Tab

Set a Global Variable

Syntax: Change GlobalVariable: *Global Variable* *value

Changes the specified Global Variable to value.

The Items Tab

Editor - Commands - Items Tab

Add/Remove Item to/from Inventory

Syntax: Add Item: *Item* Remove Item: *Item

Will add or remove the specified Item to or from the Player Inventory.

<== Back to the Overview

Clone this wiki locally