home *** CD-ROM | disk | FTP | other *** search
/ Maximum 3D 3 / m3d-p3.iso / 3DS_MAX / 3DSMAX.2_0 / SCRIPTS / DESTRUCT.MS < prev    next >
Text File  |  1997-10-19  |  2KB  |  105 lines

  1. --  Destruction.ms
  2.     
  3.     utility object_particle "Destruction"
  4. (
  5.     local  spray_obj,
  6.            start = animationRange.start.frame,
  7.            end = animationRange.end.frame
  8.            
  9. label l0 "Destruction v1.0"
  10.     label l1 "Created by Frank DeLise"
  11.     bitmap bm1 filename:"c:\\siggraph\\maps\\expsc.bmp"
  12.  
  13.     group "Destruction Type"
  14.     (  
  15.         
  16.          radiobuttons des_type
  17.             labels:#("Explosion", "Smoke")
  18.      )     
  19.           Group "Explosion" 
  20.          (
  21.     
  22.          Button exp "Create Explosion" enabled:true
  23.          )
  24.          
  25.          on exp pressed do
  26.          
  27.              (  
  28.         
  29.            spray_obj = spray constant:false birthrate:500 starttime:5 emitterwidth:1 emitterheight:1 Variation:50 speed:-2 render:1 viewportcount:2000 rendercount:200 dropsize:10 life:500    
  30.            wind emitterwidth:1 emitterheight:1 birthrate:500
  31.          max time play)
  32.  
  33.          
  34.        -- pickbutton pick_system "Pick particle system"
  35.          -- label system_name
  36.    
  37.    
  38.    Group "Smoke"
  39.    (
  40.      Button smk "Create Smoke" enabled:false
  41.       )
  42.       
  43.        
  44.    Group "Particle Age"
  45.    (
  46.             label cpl "Start color:      End color:"  
  47.             colorpicker start_color across:2 color:(color 255 100 0) offset:[-20,0]
  48.             colorpicker end_color color:(color 0 0 0) offset:[-20,0]
  49.     
  50.  
  51.       )
  52.    
  53.  
  54.    
  55.     on smk pressed do
  56.      (   Max file new  
  57.            spray_obj = spray emitterwidth:1 emitterheight:1 Variation:.2 speed:-2 render:1 viewportcount:2000 rendercount:200 dropsize:10 life:500 prefix:"SMK"    
  58.            wind emitterwidth:1 emitterheight:1
  59.          max time play
  60.     )
  61.     
  62.     
  63.     Group "Materials"
  64.         (
  65.         button applymat "Apply Smoke Material"
  66.         )
  67.  
  68.     on applymat    pressed do
  69.     (
  70.         tex = gradient ()
  71.         mat = standardmaterial diffusemap:tex
  72.         spray_obj.material = mat
  73.     )
  74.     
  75.     Group "Setings"
  76.           (
  77.           spinner start_frame "Start frame:" type:#integer range:[start, end, start]
  78.         spinner end_frame "End frame:" type:#integer range:[start, end, end]
  79.         Spinner g_buf "Object Channel" type:#integer
  80.         Checkbox mblur "Motion Blur"
  81.         )
  82.    
  83.     on des_type changed btn do
  84.     
  85.     
  86.         if btn == 1 then
  87.         
  88.         (
  89.             exp.enabled = true    
  90.             smk.enabled = false    
  91.           )
  92.         else(
  93.             exp.enabled = false  
  94.             smk.enabled = true 
  95.             )
  96.     
  97. )
  98.  
  99.   
  100.   
  101.    
  102.             
  103.   
  104.  
  105.