home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Triad.dxr / Internal_27_guy.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  673 b   |  32 lines

  1. property pSprite, spriteNum, pnorm, pExpo, pLast, pFreq, pFlash
  2.  
  3. on beginSprite me
  4.   pSprite = sprite(spriteNum)
  5.   pnorm = pSprite.member
  6.   pExpo = member("3men_2")
  7.   pLast = the ticks + 50
  8.   pFreq = 400
  9.   pFlash = 1
  10. end
  11.  
  12. on enterFrame me
  13.   if not pFlash then
  14.     if the ticks > (pLast + pFreq) then
  15.       if (random(3) mod 2) = 0 then
  16.         puppetSound(7, "opencoat")
  17.         pSprite.member = pExpo
  18.         pLast = the ticks
  19.         pFlash = 1
  20.       end if
  21.     end if
  22.   else
  23.     if the ticks > (pLast + (pFreq / 4)) then
  24.       if (random(2) mod 2) = 0 then
  25.         pSprite.member = pnorm
  26.         pLast = the ticks
  27.         pFlash = 0
  28.       end if
  29.     end if
  30.   end if
  31. end
  32.