home *** CD-ROM | disk | FTP | other *** search
/ Launch & Play / spustahrej2.iso / Egoboo / modules / advent.mod / objects / ubutton.obj / script.old < prev    next >
Encoding:
Text File  |  2001-12-03  |  1.0 KB  |  29 lines

  1. // ZZ> This function makes the button go up or down
  2. tmpx = 20                // Threshold weight
  3. tmpy = weight                // Weight of characters on top
  4. IfXIsLessThanY                //
  5.   tmpargument = 0              //
  6.   IfStateIs                  // Only go down if it's up
  7.     tmpargument = ACTIONMG            //
  8.     DoAction                    //
  9.       tmpargument = 1                  // 1 is down
  10.       SetState                      //
  11.       tmpargument = passage              //
  12.       OpenPassage                  //
  13.       KeepAction                  // Make it stay on last frame
  14.       tmpargument = 20                  //
  15.       SetBumpHeight                  //
  16. Else                    // Pop up
  17.   tmpargument = 1              //
  18.   IfStateIs                  // Only pop up if it's down
  19.     tmpargument = ACTIONMJ            //
  20.     DoAction                    //
  21.       tmpargument = 0                  // 0 is up
  22.       SetState                      //
  23.       KeepAction                  // Make it stay on last frame
  24.       tmpargument = 60                  //
  25.       SetBumpHeight                  //
  26.       tmpargument = passage              // Make sure it goes up
  27.       ClosePassage                  //
  28. End                    // Finished with this character
  29.