Difference between revisions of "Scripting Functions"

From Wiki | RPG in a Box
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
{| class="wikitable"
 
{| class="wikitable"
!Function
+
!Name
 
!Description
 
!Description
 
!Example
 
!Example
Line 9: Line 9:
 
|Displays a message box with the specified message. This can be called multiple times in a row to queue up a series of messages.
 
|Displays a message box with the specified message. This can be called multiple times in a row to queue up a series of messages.
 
|display_message("Hello world!")
 
|display_message("Hello world!")
 +
|-
 +
|Give Item
 +
|Gives the specified item to the player.
 +
|give_item("Silver Key")
 +
|-
 +
|Load Map
 +
|Loads the specified map. The player will start on the tile at the specified (x, y, z) coordinate.
 +
|load_map("main_map", 0, 1, 2, "north")
 +
|-
 +
|Modify Navigation/Interaction
 +
|Modifies the type of navigation/interaction allowed between two tiles. (0 = Walk and Interact, 1 = Walk Only, 2 = Interact Only, 3 = None)
 +
|modify_navigation("tile01", "tile02", 0)
 +
|-
 +
|Play Animation
 +
|Plays an animation for the specified entity.
 +
|play_animation(entity["door01"], "open")
 +
|-
 +
|Play Sound
 +
|Plays the specified sound effect once.
 +
|play_sound("door_open")
 +
|-
 +
|Put Player
 +
|Instantly positions the player onto the specified tile.
 +
|put_player("tile01", "south")
 +
|-
 +
|Remove Item
 +
|Removes the specified item from the player's inventory.
 +
|remove_item("Silver Key")
 +
|-
 +
|Set Entity Property
 +
|Sets a custom property for an entity to the specified value. This property can then be referenced elsewhere.
 +
|set_entity_property(self, "visited", "true")
 +
|-
 +
|Set Global Property
 +
|Sets a custom global property to the specified value. This property can then be referenced elsewhere.
 +
|set_global_property("property_name", "abc")
 +
|-
 +
|Start Battle
 +
|Starts the specified battle.
 +
|start_battle("purple_slimes")
 
|}
 
|}

Latest revision as of 11:25, 15 September 2016

The page lists all of the functions that are currently available in the RPG in a Box scripting language.

Name Description Example
Display Message Displays a message box with the specified message. This can be called multiple times in a row to queue up a series of messages. display_message("Hello world!")
Give Item Gives the specified item to the player. give_item("Silver Key")
Load Map Loads the specified map. The player will start on the tile at the specified (x, y, z) coordinate. load_map("main_map", 0, 1, 2, "north")
Modify Navigation/Interaction Modifies the type of navigation/interaction allowed between two tiles. (0 = Walk and Interact, 1 = Walk Only, 2 = Interact Only, 3 = None) modify_navigation("tile01", "tile02", 0)
Play Animation Plays an animation for the specified entity. play_animation(entity["door01"], "open")
Play Sound Plays the specified sound effect once. play_sound("door_open")
Put Player Instantly positions the player onto the specified tile. put_player("tile01", "south")
Remove Item Removes the specified item from the player's inventory. remove_item("Silver Key")
Set Entity Property Sets a custom property for an entity to the specified value. This property can then be referenced elsewhere. set_entity_property(self, "visited", "true")
Set Global Property Sets a custom global property to the specified value. This property can then be referenced elsewhere. set_global_property("property_name", "abc")
Start Battle Starts the specified battle. start_battle("purple_slimes")