@DATABASE GRAC V2 TUTORIAL
@$VER 1.0 (3/6/97) © 1997 Andy Gibson
@node main "GRAC COMMANDS - SCRIPT CONTROLLING"

      Here  is  a listing of the GRAC 2 script commands.  I don't want to
      go  into  too  much detail here because your manual fully describes
      each one, but I will add some help where required.

      Don't  forget  that after typing most of the commands, simply press
      the  Help  key on your keyboard to make easy selections.  This only
      works for some commands though :(


      @{i}SCRIPT CONTROL@{ui}
      ~~~~~~~~~~~~~~


      @{b}EXECUTE@{ub}
      Used In Verb Scripts To Execute a Command


      @{b}SCRIPT@{ub} @{i}(script number)@{ui}
      Execute the desired script and return to last position.


      @{b}SET MARK@{ub} @{i}(mark number)@{ui}
      This will set a mark from which the @{b}GOTO@{ub} command can jump to.


      @{b}GOTO MARK@{ub} @{i}(mark number)@{ui}
      The  script  will  then  be executed from the mark provided, but it
      will not return when the script ends!


      @{b}TIMER@{ub} @{i}(script) (Delay)@{ui}
      The given script is executed after the stated number of frames.


      @{b}TIMER OFF@{ub}
      Don't do the above!


      @{b}PAUSE@{ub} @{i}(delay)@{ui}
      An alternative for the @{b}TIMER@{ub} command.  Please see your manual for a
      full explanation of do's and don'ts!


      @{b}PAUSE OFF@{ub}
      Cancel the above command.


      @{b}NO DEFAULT@{ub}
      Stops  a script from executing a command.  This will give you total
      control  over  the script.  Let's say a verb tells the character to
      walk  to  an object.  The @{b}NO DEFAULT@{ub} will stop the Verb Script from
      executing.   This  means  that  you  can then make the character do
      whatever  you  want  to instead.  Please read through this tutorial
      for good use of this great command :) Another good example is this:
      Normally  when  you  click  on  the  Look  At button and then on an
      object, your character walks up to the object and says some text to
      describe  the  object, but let's say you didn't want that to happen
      for  a  particular  object.   Instead we want an IFF picture loaded
      whenever  your character looks at a certain object instead.  Simply
      use  the @{b}NO DEFAULT@{ub} command at the Look At script for an object and
      then  you  can  use  any commands you like such as the @{b}SHOW PICTURE@{ub}
      command etc. Again, please read the tutorial for more examples.


      @{b}COMPARE@{ub} @{i}(value) (value)@{ui}
      Compare  the value of two numbers.  Especially useful for comparing
      values which have to be used with the @{b}IF@{ub} instruction.  Flags can be
      preceded by the hash (@{b}#@{ub}) character.


      @{b}COMPARE ITEM@{ub} @{i}(flag) (value)@{ui}
      The  current  inventory  item  and  either  the  flag  or the value
      (whichever  is  positive) are set.  Press HELP for easier selection
      after you type @{b}COMPARE ITEM@{ub} in the script editor.


      @{b}COMPARE ENTRY@{ub} @{i}(flag) (value)@{ui}
      Similar  to  the above command, but this one checks the entry point
      from  which  the  character  enters  a  room.  You can use the HELP
      function  to  choose the point also.  Great for starting animations
      etc.


      @{b}IF@{ub} @{i}(expression) (not)@{ui}
      This  command  will  probably be the most used in your game!  It is
      used  for  almost everything from checking to see if a door is open
      or  closed  to  seeing  if  a  character should appear in a certain
      location  or not etc.  Your manual fully describes this command, as
      does this tutorial in several places.


      @{b}END IF@{ub}
      Used to end the above command.


      @{b}ELSE IF@{ub} @{i}(expression) (not)@{ui}
      Use  this command only inside and @{b}IF...END IF@{ub} script block of text.
      Again,  your manual describes this as does this tutorial in several
      of its scripts.


      @{b}ELSE@{ub}
      Used  inside and @{b}IF...END IF@{ub} script block.  Please see the tutorial
      scripts for a full example of this command.


      @{b}FOR@{ub} @{i}(flag) (start value)@{ui}
      (commands to be repeated)
      @{b}NEXT@{ub} @{i}(limit)@{ui}
      This   is  another  complicated  one  to  get  to  grips  with  for
      non-programmers, but it is very simple to explain.  The flag is set
      to  a value by you and all the commands before the @{b}NEXT@{ub} command are
      executed until the limit value is reached.

      @{i}eg.@{ui}

      @{b}FOR 1 1
      Bell
      NEXT 10@{ub}

      The bell would ring ten times. Simple as that.


      @{b}WAIT@{ub} @{i}(frames)@{ui}
      Wait for the set amount of frames. Each frame is 1/10th of a second
      so  simply  use  this  as a pause in your script for as short or as
      long as you want.


      @{b}WAIT CLICK@{ub} @{i}(frames)@{ui}
      Wait for either a mouse click or the amount of frames.


      @{b}END@{ub}
      Simply end the current script.  Obviously this can be used to end a
      script  at  a  certain  line and not just the last one.  Especially
      useful if you have set a @{b}MARK@{ub} after the @{b}END@{ub} line.


      @{b}QUIT@{ub}
      If this command is used, your game will quit back to DOS.

@endnode
