Skip to content

Handy Dandy Quick Reference Guide to Everything

sleepinghungry edited this page Jan 14, 2017 · 7 revisions

Handy Dandy Quick Reference Guide to Everything

Locations and Connections

Command to create a new location:

######      location_variable = game_variable.new_location("Name of Location","Description of Location")

Example:

      sidewalk = game.new_location("Sidewalk","You are on a paved sidewalk.")

Command to create a new connection:

######      connection_variable = game_variable.new_connection("Name of Connection", from_location_variable, to_location_variable, DIRECTION, REVERSE_DIRECTION) ######      connection_variable = game_variable.new_connection("Name of Connection", from_location_variable, to_location_variable, [DIRECTION1, DIRECTION2], [REVERSE_DIRECTION1, REVERSE_DIRECTION2])

Examples:

      front_door = game.new_connection("Front Door", sidewalk, vestibule, IN, OUT)
      front_door = game.new_connection("Front Door", sidewalk, vestibule, [IN, EAST], [OUT, WEST])

Command to set the location where the game starts:

######      player_variable = game_variable.set_player(location_variable)

Example:

      player = game.set_player(sidewalk)

Items

Command to create a new item:

######      item_variable = location_variable.new_object("item name","item description")

Example:

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

Command to make an item required somewhere:

######      location_variable.make_requirement(item_variable)
######      connection_variable.make_requirement(item_variable)

Examples:

      office.make_requirement(key)
      office_door.make_requirement(key)

Command to make a new in-game command:

######      item_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."))

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