BEHAVIOR-SCRIPT
Generic Mobile Behavior.
This behavior provides mobile scripting functionality.
Arguments: <trigger> [custom <custom event #>] [.] Next Lines: [<script commands>]
Script Commands:
command <command> (you can abbreviate "command" to just "c") js <javascript script> gojs <javascript script that returns a label name> speed <speed (in pulses)> spawn <spawn options, see SPAWN> unspawn <custom event> label <label name>
You can also specify multiline JavaScript scripts by entering "js .". All the following lines will be included into the same JavaScript until a line containing just "!" is encountered.
ex: mb sean script hour 10 . speed 3 c n c e js . if ( self.hit < self.maxHit / 2 ) act( 'whine' ); ! c e c n c say good morning! js self.db.saidGoodMorning++; self.go( self.homeNumber );
For an example of using Script to script conversations, see SCRIPT-CONVERSATION-EXAMPLE.
For an example of the "gojs" and "label" options see SCRIPT-LABEL-EXAMPLE.