Skip to content

Handy Dandy Guide to Items

sleepinghungry edited this page Jan 17, 2017 · 11 revisions

Handy Dandy Guide to Items

Step-By-Step Guide

To create a new item

  1. Choose your location variable for where you want the item to first appear:
          location_variable
    Example:
          sidewalk

  2. Attach the new_object command to it:
          location_variable**.new_object()**
    Example:
          sidewalk.new_object()

  3. Pick a name for your new item:
          location_variable.new_object("item name")
    Example:
          sidewalk.new_object("stick")

  4. Pick a description for your new item:
          location_variable.new_object("item name", "item description")
    Example:
          sidewalk.new_object("stick","a wooden stick")

  5. Store your new item in a variable:
          item_variable = location_variable.new_object("item name", "item description")
    Example:
          stick = sidewalk.new_object("stick","a wooden stick")

To add an in-game command for an item

  1. Choose what item you want to make an in-game command for:
          item_variable
    Example:
          stick

  2. Attach the add_phrase command to it:
          item_variable**.add_phrase()**
    Example:
          stick.add_phrase()

  3. Add the in-game command:
          item_variable.add_phrase("in-game command")
    Example:
          stick.add_phrase("wave stick")

  4. Add what the game says when the in-game command is used (THERE ARE TWO END PARENTHESES!!!):
          item_variable.add_phrase("in-game command", Say("What the game will say."))
    Example:
          stick.add_phrase("wave stick", Say("You feel like a powerful wizard!"))

To make an item a requirement for a location or connection

  1. Choose what you want a requirement for:
          location_or_connection_variable
    Example:
          office_door

  2. Add the make_requirement command:
          location_or_connection_variable**.make_requirement()**
    Example:
          office_door.make_requirement()

  3. Add the item that is required for your location or connection
          location_or_connection_variable.make_requirement(item_variable)
    Example:
          office_door.make_requirement(key)

BWX Game Engine pages

Python Pages

Step By Step Guides

Building Conditionals

Lectures

Explaining Conditionals

Assignments

I Am Thinking of a Number...

Clone this wiki locally