HomeIndex

Game System Commands

inInventory(object, actor=null)
Returns true if the object is in the actors inventory.
getInventory(actor=null)
Returns the inventory array for an actor, or null if they don't have one.
bounceInventory(object)
Bounces an object in the inventory
removeInventory(object, actor=null)
Removes an object from the actors inventory and refreshes the UI
The the actor is omitted or null, it uses the selectedActor
pickupObject(object, actor=null)
Picks up an inventory object.
The inventory object is not the object in the room, it is a object in the Inventory.dinky file. The caller is responsible for changing the state of the object in the room. If actor is null, the selectedActor is used.
getValue(value)
Returns a value that is value or value()
This allows string fields in objects to stored as name = "bob" or name = @() { return "bob" }
_selectedActorChanged(actor)
Called when the selected actor changes
_triggerCallback(trigger, actor, code, state)(actor)
Called when an actor enters or leaves a trigger.
Only the selected actor will trigger a trigger unless the trigger has the any_actor = YES flag set.
If trigger object has a trigger(actor, state) function, then it is called passing the actor and a state of TRIGGER_ENTER or TRIGGER_LEAVE.
Otherwise, if the trigger object has a triggerEnter() or a triggerLeave() function those will be called.
And finally, it will try and call the code passed during a addTrigger() call.
exitRoomFromDoor(from_door, to_door)
Call when you need to leave a room from one door to another door.
The 'selectedActor' is moved to the room of the 'to_door'.
This function performs all animations need for the two doors.
The 'to_door' is animated closing after entering if 'autoclose' is set for that door. See Doors for more information about door objects.
registerVerbs(object)
Call if you add or remove verbs outside of room.preEnter()
When verbs are added or removed, the object's known verbs needs to be rebuilt to reflect that. This is automatically done after the room.preEnter() is called, but not at other times. If you need to add or remove verbs when entering a room, it's best to do it in room.preEnter.
slideInventory(object)
slides an inventory item on and off screen is the inventory is not showing.