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

How to:Use String or Array or Function

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 with_success: asset.get[in]direct_object_of_verb[verb].with_success
  • verb subscription then_destroy: asset.get[in]direct_object_of_verb[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

For more information, please send mail to webmaster@adventurejs.com.
Documentation generated by JSDoc 3.6.11 on Mon Nov 20 2023 18:04:50 GMT-0800 (Pacific Standard Time)
Found a problem or error in the docs? Report it to docs@adventurejs.com.