AINE: Accelerated Interactive Narrator Engine
  • Download
  • References
  • Games
  • Wiki
  • Facebook Twitter
  • Name

    Player

  • Examples

    Room: startRoom

    Player:
    {
    start: startRoom
    // Declares a starting room for the player
    // The player most have a starting room

    name: "Henrik";
    gender: "male";
    image: "img_player";
    desc: "someText";
    tooltip: "This is you";

    Event: "Examine" {
    display(this)
    // Displays the description and image of the player
    }
    }
  • Description

    The Player object is used to declare a character for the game.

    Initial properties can be assigned to the player object doing declaration.

    The instance of the Player object is player by default, which is a reserved identifier for the Player object.

    Declaring an instance for a Player object will create an alias instance for the Player object.

    All declarations of a Player object will be merged into the same Player object, as there can be only one player.

    If name is unassigned doing declaration, the name will be set to "player".

    This object can carry items.
  • Syntax

    • Player:
    • Player: instance
    • Player: {statements}
    • Player: instance {statements}
  • Methods

    • currentRoom()

      Returns the room the player is currently in
    • disableEvent()

      Disables the event for the player, if declared
    • dropItem()

      Moves an item from the player to the current room
    • dropItems()

      Moves all items on the player to the room the player is in
    • enableEvent()

      Enables the event for the player, if declared
    • getDesc()

      Returns the description of the player
    • getGender()

      Returns the gender of the player
    • getImage()

      Returns the image of the player
    • getItems()

      Returns a list of all items on the player
    • getName()

      Returns the name of the player
    • getTooltip()

      Returns the tooltip of the player
    • giveItem()

      Moves an item to the player
    • hasItem()

      Returns a boolean value of whether the player has an item
    • isEnabled()

      Returns a Boolean value of whether the event is enabled on the player
    • moveTo()

      Moves the player to a room. (Does not trigger enter-room events)
    • setDesc()

      Sets the description of the player
    • setGender()

      Sets the gender of the player
    • setImage()

      Sets the image of the player
    • setItems()

      Replaces the current item list on the player with a new list of items
    • setName()

      Sets the name of the player
    • setTooltip()

      Sets the tooltip of the player
    • showEvents()

      Shows a list of custom events for the player
    • trigger()

      Triggers an event on the player remotely
  • Properties

    • desc

      Holds the description of the player
    • image

      Holds the image of the player
    • items

      Holds a list of items carried by the player
    • gender

      Holds the gender of the player
    • name

      Holds the name of the player
    • start

      Declares the starting room of the player
    • tooltip

      Holds the tooltip for the player
  • Related

    • <Image>

    • Character

    • Event

    • Item

    • Object

    • Room

  • Contact
  • Terms of Use
  • GitHub
  • Drakkashi.com

The copyright of all images rendered by me goes to their respective owners.
© 2008 Daniel Svejstrup Christensen