home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / rogue.mod / objects / tranch.obj / script.txt < prev    next >
Text File  |  2000-07-08  |  2KB  |  109 lines

  1. IfSpawned
  2.   MakeCrushValid
  3.  
  4.  
  5. IfCrushed
  6.   tmpx = selfx
  7.   tmpy = selfy
  8.   tmpdistance = selfz
  9.   tmpargument = 1
  10.   SpawnExactParticle
  11.   SpawnExactParticle
  12.   GoPoof
  13.   tmpargument = 1
  14.   SendMessageNear
  15.  
  16.  
  17. IfDropped
  18.   // Popped out of a chest
  19.   tmpargument = 3
  20.   tmpdistance = 22050
  21.   PlaySound
  22.  
  23.  
  24. IfKilled
  25.   tmpargument = 0
  26.   SendMessageNear
  27.   tmpargument = 40
  28.   SetBumpHeight
  29.   tmpargument = 1
  30.   tmpdistance = rand & 4095 + 11000
  31.   PlaySound
  32.  
  33.  
  34. IfAttacked
  35.   SetTargetToWhoeverAttacked
  36.     tmpargument = 0
  37.     tmpdistance = rand & 4095 + 11000
  38.     PlaySound
  39.  
  40.  
  41. IfBumped
  42.   SetTargetToWhoeverBumped
  43.   IfTargetIsOnHatedTeam
  44.     IfFacingTarget
  45.       tmpargument = LATCHLEFT
  46.       PressLatchButton
  47.   Else
  48.     tmpx = rand & 1023 - 512 + selfx
  49.     tmpy = rand & 1023 - 512 + selfy
  50.     ClearWaypoints
  51.     AddWaypoint
  52.     SetTargetToOldTarget
  53.  
  54.  
  55.  
  56. // Look for enemies
  57. IfTimeOut
  58.   SetTargetToNearestEnemy
  59.     IfFacingTarget
  60.       tmpx = targetdistance
  61.       tmpy = 800
  62.       IfXIsLessThanY
  63.         tmpx = selfaccel
  64.         tmpy = 1
  65.         IfXIsMoreThanY
  66.           tmpargument = LATCHJUMP
  67.           PressLatchButton
  68.           tmpx = targetx - selfx > 4
  69.           tmpy = targety - selfy > 4
  70.           SetOldTarget
  71.           SetTargetToSelf
  72.           AccelerateTarget
  73.           SetTargetToOldTarget
  74.  
  75.           // Play the sound
  76.           tmpargument = 2
  77.           tmpdistance = rand & 1023 + 10500
  78.           PlaySound
  79.       tmpx = targetx
  80.       tmpy = targety
  81.     Else
  82.       tmpx = selfx
  83.       tmpy = selfy
  84.       tmpturn = selfturn
  85.       tmpdistance = 500
  86.       Compass
  87.       tmpx = tmpx + targetx + targetx + targetx > 2
  88.       tmpy = tmpy + targety + targety + targety > 2
  89.     ClearWaypoints
  90.     AddWaypoint
  91.   Else
  92.     tmpx = selfx
  93.     tmpy = selfy
  94.     tmpturn = selfturn
  95.     tmpdistance = 500
  96.     Compass
  97.     tmpturn = rand & 1023 - 512 + selfx
  98.     tmpx = tmpx + tmpturn + tmpturn + tmpturn > 2
  99.     tmpturn = rand & 1023 - 512 + selfy
  100.     tmpy = tmpy + tmpturn + tmpturn + tmpturn > 2
  101.     ClearWaypoints
  102.     AddWaypoint
  103.   tmpargument = rand & 31 + 25
  104.   SetTime
  105.  
  106.  
  107. // All done
  108. End
  109.