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

  1. // ZZ> This function makes an item fall to the floor when spawned
  2. IfSpawned                //
  3.   tmpargument = ACTIONJB          //
  4.   DoAction                  //
  5.   KeepAction                  //
  6.   MakeCrushValid
  7. IfCrushed
  8.   tmpx = selfx
  9.   tmpy = selfy
  10.   tmpdistance = selfz
  11.   tmpargument = 5
  12.   SpawnExactParticle
  13.   SpawnExactParticle
  14.   SpawnExactParticle
  15.   SpawnExactParticle
  16.   GoPoof
  17.   tmpargument = 1
  18.   SendMessageNear
  19. IfDisaffirmed
  20.   tmpargument = 2
  21.   SendMessageNear
  22. IfDropped                // Make it lie on floor
  23.   KeepAction                  //
  24. IfHitGround                // Make a sound
  25.   tmpargument = 0              //
  26.   tmpdistance = rand & 2047 + 10000      //
  27.   PlaySound                  //
  28. IfUsed                    // Spawn damage particle
  29.   tmpx = selfattached              //
  30.   tmpy = 0                  //
  31.   tmpargument = 0              //
  32.   IfXIsMoreThanY              // Is the flame still there?
  33.     tmpargument = 1                // Yes
  34.   tmpdistance = SPAWNLAST          // Model vertex to attach to
  35.   SpawnAttachedParticle              //
  36. IfGrabbed                // Tell them what they've won...
  37.   SetTargetToWhoeverIsHolding          //
  38.     tmpargument = [XFIR]            // Burn hands...
  39.     IfTargetHasAnyID
  40.       tmpargument = 3
  41.       SendMessageNear
  42.       DetachFromHolder
  43.       tmpargument = 256
  44.       DamageTarget
  45.     Else
  46.       IfTargetIsAPlayer
  47.         tmpargument = 0
  48.         SendMessageNear
  49. End                    // All done
  50.