home *** CD-ROM | disk | FTP | other *** search
/ Unreal Tournament Game Programming for Teens / UnrealTournamentGameProgrammingForTeens.iso / start.exe / start.dxr / 00033_special.ls < prev    next >
Encoding:
Text File  |  2006-11-09  |  1.1 KB  |  53 lines

  1. global upDown, speed
  2.  
  3. on beginSprite
  4.   upDown = "Up1"
  5.   speed = 2
  6. end
  7.  
  8. on exitFrame me
  9.   if upDown = "Up1" then
  10.     sprite(2).blend = sprite(2).blend + speed
  11.   end if
  12.   if upDown = "Up2" then
  13.     sprite(3).blend = sprite(3).blend + speed
  14.   end if
  15.   if upDown = "Down1" then
  16.     sprite(2).blend = sprite(2).blend - speed
  17.   end if
  18.   if upDown = "Down2" then
  19.     sprite(3).blend = sprite(3).blend - speed
  20.   end if
  21.   case upDown of
  22.     "Up1":
  23.       if sprite(2).blend > 99 then
  24.         upDown = "Down1"
  25.       end if
  26.     "Down1":
  27.       if sprite(2).blend < 1 then
  28.         upDown = "Up2"
  29.       end if
  30.     "Up2":
  31.       if sprite(3).blend > 99 then
  32.         sprite(2).blend = 0
  33.         upDown = "Down2"
  34.       end if
  35.     "Down2":
  36.       if sprite(3).blend < 1 then
  37.         upDown = "Up1"
  38.       end if
  39.   end case
  40.   if the frame = 5 then
  41.     if sprite(6).blend < 99 then
  42.       repeat with x = 4 to 16
  43.         if sprite(x).blend < 99 then
  44.           sprite(x).blend = sprite(x).blend + 2
  45.         end if
  46.       end repeat
  47.     else
  48.       go(the frame + 1)
  49.     end if
  50.   end if
  51.   go(the frame)
  52. end
  53.