home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 416.lha / EnergionBattleSystem_v1.0 / crater.ebs < prev    next >
Text File  |  1990-08-30  |  839b  |  27 lines

  1. /* Draws a crater around an IFWeapon's impact location */
  2.  
  3. arg unit
  4. options results
  5. 'get [unit' unit 'location]'
  6. parse var result x y z i p ux uy
  7. 'get [marker' unit 'color]'
  8. 'set colors 5' result
  9. 'get [targetloc]'
  10. parse var result x y z i p px py
  11. 'draw line' ux uy px py 'pixels'
  12. 'set colors 1 7 7 7 7 7 7 7 7 7'
  13. scatter = random(5,20,time('m'))
  14. maxpts = random(5,20)
  15. 'draw fcircle' px py '2 PIXELS COPYIT'
  16. do i=0 to maxpts
  17.   x = random(1,4)
  18.   select
  19.     when x = 1 then 'draw ppoint' px+random(0,scatter) py+random(0,scatter) 'PIXELS COPYIT'
  20.     when x = 2 then 'draw ppoint' px-random(0,scatter) py+random(0,scatter) 'PIXELS COPYIT'
  21.     when x = 3 then 'draw ppoint' px-random(0,scatter) py-random(0,scatter) 'PIXELS COPYIT'
  22.     when x = 4 then 'draw ppoint' px+random(0,scatter) py-random(0,scatter) 'PIXELS COPYIT'
  23.   end
  24. end
  25. exit(-1)
  26.  
  27.