Note: This page is no longer being maintained and
is kept for archival purposes only.|
For current information see our main page.
Developers of custom software and educational simulations.
|Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company|
StoryHarp & IF
StoryHarp & Java
|Defining special conditions for command availability (requirements and changes) We will explain requirements and changes together because both fields in the rule editor panel work the same way, and because requirements and changes are almost always used together. Requirements specify variables that must be true or false as desired before the command in the rule can be available. Changes specify variables that are set to true or false as desired when the command in the rule has been said. How requirements and changes are shown Requirements and changes are shown in the rule editor panel as lists of variables. In the requirements list, variables that are required to be not true are prefaced by a tilde ("~", typically located above the Tab key on your keyboard). For the command to be available, all the listed variables must be in the desired state (true or not true, ex. “has key” or “~has key”). In the changes list, variables that become not true as a result of saying the command are prefaced by a tilde (ex. a change of “~carrying food” for after saying the command “eat the food”). What the tildes mean A requirement with a tilde in front of it wants to be "not true" (the same as false) in order for the rule to be available. In this case, if the variable is true, the rule will not be available. A change with a tilde in front of it will make the variable not true regardless of whether the variable was true or not to begin with. This is complex stuff Working with requirements and changes is the most complex part of writing StoryHarp adventures, so you should probably go through the tutorials before you define many requirements or changes. In particular, see Step 4: Add requirements and changes and Step 5: Add more requirements in the intermediate tutorial. Adding a new requirement or change The requirements and changes fields in the rule editor panel are list boxes. The last entry in each list box is always blank. To enter a new entry, click on the first blank line below any entries. An edit box will appear that floats above that entry in the list box, and you can type your entry into the floating edit box. Using the keyboard, you can tab to the list box and use the up or down arrow keys to highlight the last blank entry, and then press Enter to get the floating edit. After typing in the floating edit box, press Tab to leave the field and commit your change. You can also add a new entry by dragging text from the map or browser and dropping it into the requirements or changes list. Changing an existing requirement or change To edit an existing entry, double click on it in the list. A floating edit box will appear with the text for that item, and you can type or paste there. Using the keyboard, you can tab to the list box and use the up or down arrow keys to highlight the list item, then press Enter to get the floating edit box. After typing in the floating edit box, press Tab to leave the field and commit your change. Deleting a requirement or change To delete an entry from the list, select the entry by clicking on it once, then press the Delete key to remove it or press Control-X to cut it. Changing the true-false specification of a requirement or change To change an entry from true to not true (meaning false), you need to put a tilde ("~") in front of it. For existing items, the easiest way to do this is to click all the way to the left of the item, but still inside the list box. This will toggle the tilde on and off. You can also enter the tilde in the floating edit box. But be careful not to end up with two tildes in a row when using the floating edit box. You can get rid of a second tilde by deleting it in the floating edit box or by turning off the first tilde with a mouse click.|
Updated: March 10, 1999. Questions/comments on site to email@example.com.
Copyright © 1998, 1999 Paul D. Fernhout & Cynthia F. Kurtz.