Skip to content

Handy Dandy Guide to Items

sleepinghungry edited this page Jan 13, 2017 · 11 revisions

Handy Dandy Guide to Items

Quick Reference

Command to create a new item:

      object_variable = location_variable.new_object("Object Name","Object description")

Example:

      key = sidewalk.new_obejct("key","a small silver key")

Command to make an object required somewhere:

      location_variable.make_required(object_variable)
      connection_variable.make_required(object_variable)

Examples:

      office.make_required(key)       office_door.make_required(key)

Command to make a new in-game command:

      variable.add_phrase("command", Say("What the game says after you use the game command"))

Example:       key.add_phrase("rub key", Say("This is not a magic lamp."))

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

  1. Attach the new_object command to it:

      location_variable . new_object()

Example: sidewalk.new_object()

  1. Pick a name for your new object:

      location_variable.new_object("object name")

Example: sidewalk.new_object("stick")

  1. Pick a description for your new object:

      location_variable.new_object("object name", "Object Description")

Example: sidewalk.new_object("stick","a wooden stick")

  1. Store your new object in a variable:

      object_variable = location_variable.new_object("object name", "object description")

Example: stick = sidewalk.new_object("stick","a wooden stick")

To add an in-game command for an object
  1. Choose what object you want to make an in-game command for:
          object_variable
    Example: stick

  2. Attach the add_phrase command to it:

      object_variable . add_phrase()

Example: stick.add_phrase()

  1. Add the in-game command:

      object_variable.add_phrase("in-game command")

Example: stick.add_phrase("wave stick")

  1. Add what the game says when the in-game command is used:

      object_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

  1. Add the make_requirement command:

      location_or_connection_variable . make_requirement()

Example: office_door.make_requirement

  1. 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