This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
kalbfled edited this page Jul 23, 2019
·
11 revisions
This page documents the types of prerequisites and consequences the engine supports. See pncgame.xsd for schema details. Note that locations and events cannot be given an Id value less than 1 because location 0 always represents the player's inventory. (This is hard-coded in pncevent.js --> PointAndClickEvent.fromXML.)
- item - The item given by "itemid" must be in the location given by the node's value.
- noitem - The item given by "itemid" must not be in the location given by the node's value.
- audio - Set the file referenced by the node's value as the value of the "src" attribute for the "source" element referenced by PointAndClickGame.audio_source_fx, and play the audio. Note that PointAndClickGame includes the audio_source_soundtrack attribute, but the schema does not yet accommodate soundtrack music. You are free to include an "audio" element in the containing HTML page that plays music, but the engine will not manipulate it unless you give it an extension function.
- custom - The creates a default consequence function that throws an exception. The game designer must manually replace this function with a custom function. See testgame/test.html for an example. At the moment, use custom functions to affect different consequences for different values of a game's active_item property.
- item - Move the item specified by the "itemid" attribute to the location given by the node's value.
- location - Set the value of the game's "player_location" attribute to the node's value.
- message - Add the node's value to the message buffer.