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

  1. // ZZ> This function makes an item fall to the floor when spawned
  2. IfScoredAHit
  3.   SetTargetToRider
  4.     tmpargument = 30
  5.     tmpdistance = EXPROLEPLAY
  6.     GiveExperienceToTarget
  7. IfSpawned                // General stuff
  8.   SetTurnModeToWatch
  9.   MakeAmmoKnown
  10.   tmpx = selfx - 200
  11.   tmpy = selfy
  12.   ClearWaypoints
  13.   AddWaypoint
  14. IfDismounted                // Turn it west
  15.   tmpx = selfx - 200
  16.   tmpy = selfy
  17.   ClearWaypoints
  18.   AddWaypoint
  19. IfHealed                // Drop the rider
  20.   SetTargetToRider
  21.     DropWeapons
  22.     tmpx = 15
  23.     tmpy = 0
  24.     AccelerateTarget
  25. IfMounted
  26.   IfAmmoOut
  27.     GetState // NOP
  28.   Else
  29.     SetTargetToRider
  30.       IfTargetIsAPlayer
  31.         tmpargument = 0
  32.         SendMessageNear
  33.         tmpargument = 5
  34.         tmpdistance = 12500
  35.         PlaySound
  36. IfUsed                    // Set number of shells to drop
  37.   tmpargument = 8
  38.   SetContent
  39.   tmpargument = 0
  40.   SetTime
  41.   // Play the machine gun sound
  42.   IfAmmoOut
  43.     tmpargument = 0
  44.     StopSound
  45.     tmpargument = 3
  46.     tmpdistance = 11025
  47.     PlaySoundLooped
  48.     tmpargument = 2
  49.     SetState
  50.   Else
  51.     tmpargument = 0
  52.     tmpdistance = 11025
  53.     PlaySoundLooped
  54.     tmpargument = 1
  55.     SetState
  56. // Firing state
  57. IfStateIs1
  58.   IfTimeOut
  59.     // Down the count
  60.     tmpargument = 0
  61.     GetContent
  62.     tmpargument = tmpargument - 1
  63.     SetContent
  64.     // Check ammo
  65.     IfAmmoOut
  66.       tmpargument = 0
  67.       StopSound
  68.       tmpargument = 2
  69.       SetState
  70.     // Drop a shell
  71.     Else
  72.       tmpx = selfx
  73.       tmpy = selfy
  74.       tmpdistance = selfz
  75.       tmpargument = 3
  76.       SpawnExactParticle
  77.     // Do again in 9 frames
  78.     tmpargument = 9
  79.     SetTime
  80.     // Stop sounds
  81.     tmpargument = 0
  82.     IfContentIs
  83.       StopSound
  84.       SetState
  85.       // Do an echo
  86.       tmpargument = 2
  87.       tmpdistance = 11025
  88.       PlaySound
  89. // Whirring state
  90. IfStateIs2
  91.   IfTimeOut
  92.     // Down the count
  93.     tmpargument = 0
  94.     GetContent
  95.     tmpargument = tmpargument - 1
  96.     SetContent
  97.     // Do again in 9 frames
  98.     tmpargument = 9
  99.     SetTime
  100.     // Stop sounds
  101.     tmpargument = 0
  102.     IfContentIs
  103.       SetState
  104.       tmpargument = 3
  105.       StopSound
  106.       // Do the hum out
  107.       tmpargument = 4
  108.       tmpdistance = 11025
  109.       PlaySound
  110. End                    // All done
  111.