home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / palshad.mod / objects / dsword.obj / script.txt < prev    next >
Text File  |  2000-06-03  |  2KB  |  78 lines

  1. // ZZ> This function makes an item fall to the floor when spawned
  2. IfSpawned                //
  3.   SetTargetToSelf
  4.   tmpargument = ACTIONJB          //
  5.   DoAction                  //
  6.   KeepAction                  //
  7.   MakeCrushValid
  8.   tmpargument = rand & 7 + 3
  9.   SetContent
  10. IfCrushed
  11.   tmpx = selfx
  12.   tmpy = selfy
  13.   tmpdistance = selfz
  14.   tmpargument = 1
  15.   SpawnExactParticle
  16.   SpawnExactParticle
  17.   SpawnExactParticle
  18.   SpawnExactParticle
  19.   GoPoof
  20.   tmpargument = 1
  21.   SendMessageNear
  22. IfDropped                // Make it lie on floor
  23.   tmpargument = rand & 3 + 5
  24.   SetContent
  25.   SetTargetToSelf
  26.   KeepAction                  //
  27. IfHitGround                // Make a sound
  28.   tmpargument = 1              //
  29.   tmpdistance = rand & 2047 + 10000      //
  30.   PlaySound                  //
  31. IfTakenOut                // Make a sound
  32.   tmpargument = rand & 3 + 5
  33.   SetContent
  34.   tmpargument = 2              //
  35.   tmpdistance = rand & 2047 + 10000      //
  36.   PlaySound                  //
  37.   SetTargetToWhoeverIsHolding          //
  38.   IfTargetIsAPlayer              //
  39.     tmpargument = 2              //
  40.     SendMessageNear              //
  41. IfGrabbed                // Tell them what they've won...
  42.   SetTargetToWhoeverIsHolding          //
  43.   IfTargetIsAPlayer              //
  44.     tmpargument = 0              //
  45.     SendMessageNear              //
  46. IfTimeOut
  47.   // Heh, heh, heh...
  48.   SetTargetToWhoeverIsHolding
  49.     GetContent
  50.     tmpx = tmpargument
  51.     tmpy = 2
  52.     IfXIsLessThanY
  53.       tmpy = 1
  54.       IfXIsEqualToY
  55.         tmpargument = 3
  56.         tmpdistance = 11025
  57.         PlaySound
  58.         tmpargument = 3
  59.         SendMessageNear
  60.         tmpargument = 0
  61.         SetContent
  62.     Else
  63.       tmpargument = tmpargument - 1
  64.       SetContent
  65.  
  66.  
  67.     tmpx = targetlife
  68.     tmpy = 1024
  69.     IfXIsMoreThanY
  70.       tmpargument = 0 - 8
  71.       GiveLifeToTarget
  72.     tmpargument = 256
  73.     HealTarget
  74.   tmpargument = 50
  75.   SetTime
  76.  
  77. End                    // All done
  78.