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

    Item

  • Examples

    Item: book
    {
    name: "Book";
    image: "img_book";
    desc: "someText";
    tooltip: "This is a book"

    Event: Game_Start {
    player.giveItem(this)
    // Gives book to the player at game start

    disableEvent("Take")
    // Disables the "Take" event, because the item is currently carried by the player
    }

    Event: "Take" {
    moveTo(player)
    disableEvent("Take")
    enableEvent("Drop")
    }

    Event: "Drop" {
    player.dropItem(this)
    // Moves book from the player to the room the player is in

    disableEvent("Drop")
    enableEvent("Take")
    }
    }
  • Description

    Item is used to declare an item object for the game.

    Initial properties can be assigned to an item object doing declaration.

    If name is unassigned doing declaration, the instance of the item will be used as name.
  • Syntax

    • Item: instance
    • Item: instance {statements}
  • Methods

    • currentRoom()

      Returns the room the item is currently in.
    • disableEvent()

      Disables the event for the item, if declared
    • enableEvent()

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

      Returns the description of the item
    • getImage()

      Returns the image of the item
    • getName()

      Returns the name of the item
    • getTooltip()

      Returns the tooltip of the item
    • isEnabled()

      Returns a boolean value of whether the event is enabled on the item
    • moveTo()

      Moves the item to the player, a room or a character
    • remove()

      Removes the item from the game.
    • setDesc()

      Sets the description of the item
    • setImage()

      Sets the image of the item
    • setName()

      Sets the name of the item
    • setTooltip()

      Sets the tooltip of the item
    • showEvents()

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

      Triggers an event on the item remotely
  • Properties

    • desc

      Holds the description of the item
    • image

      Holds the image of the item
    • name

      Holds the name of the item
    • tooltip

      Holds the tooltip for the item
  • Related

    • <Image>

    • Character

    • Event

    • Object

    • Player

    • 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