SWAT TUTORIAL
Abort Script
Very rarely, you'll encounter a situation in which you need an Actor to abort an already-established Plan. For example, suppose that Mary decides to poison Tom and the first step of her scheme is to cook the poison, which takes several hours. While the poison is cooking, Tom comes by to visit and sincerely apologizes for his past transgressions against Mary. They kiss and make up. However, the poison is still cooking and when the cooking is complete, Mary has a Plan in place to put the poison into Tom's coffee. How do you prevent this from happening?

The old way was to insert some sort of test in the Inclination Script that asked "Gee, has
Tom apologized for his transgressions?" This turned out to be clumsy, and the Scripts necessary to make it work were long and complicated. So we designed a better system: the Abort Script. This Script is so rarely needed that we don't make it an automatic part of the normal scripting process. Instead, it is optional. To turn on the Abort Script, you have to open the Properties box for the Verb and check the "Abort" checkbox therein. This places a new Script button (Abort) above the Consequences menu button. This Script takes a boolean value; if it evaluates to true, then execution of the Plan containing that Verb will be aborted. The Engine checks the Abort Script whenever it is about to execute a Plan containing that Verb.  This way, Mary could abort poisoning Tom and two minutes later, Jennifer could proceed with poisoning Bob.



Previous tutorial:  Properties Box                                                                             Next tutorial:  Relationship Editor



Home     SiteMap     Feedback     FAQ     Press Room     Privacy Policy     Login