Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
Tutorial explaining how to take advantage of fields that use getStringOrArrayOrFunction in Adventurejs. tutorial, getSAF, getStringOrArrayOrFunction

Start Scripting:String | Array | Function

To be completed...

Adventurejs takes advantage of Javascript's weak typing to do something a bit cheeky: for some properties, it will accept string or array or function and smartly figure what to do with each.

Properties that call getStringOrArrayOrFunction

  • verb subscription on_success: asset.[i|d]ov[verb].on_success
  • verb subscription then_destroy: asset.[i|d]ov[verb].then_destroy
  • all descriptions: asset.description and asset.descriptions[any]
  • room events: room.room_events
  • zone events: room.zone.zone_events
  • custom vars: MyGame.world._vars[ property ]
  • constraint message: character.constrained_msg