This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 23rd, 2011  |  syntax: None  |  size: 1.86 KB  |  views: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #****************************************************************************
  2. #**
  3. #**  File     :  /cdimage/units/UEC1501/UEC1501_script.lua
  4. #**  Author(s):  John Comes, David Tomandl, Gordon Duclos
  5. #**
  6. #**  Summary  :  Earth Manufacturing Center, Ver1
  7. #**
  8. #**  Copyright © 2005 Gas Powered Games, Inc.  All rights reserved.
  9. #****************************************************************************
  10. local TEnergyCreationUnit = import('/lua/terranunits.lua').TEnergyCreationUnit
  11.  
  12. WEB1303 = Class(TEnergyCreationUnit) {
  13.        
  14.         EffectBones01 = {
  15.                 'Smoke_Left01', 'Smoke_Left02', 'Smoke_Left03', 'Smoke_Left04', 'Smoke_Left_05',                                       
  16.                 'Smoke_Right01', 'Smoke_Right02', 'Smoke_Right03', 'Smoke_Right04',                                                    
  17.         },
  18.        
  19.         EffectBones02 = {
  20.                 'Smoke_Right05', 'Smoke_Right06',
  21.         },
  22.  
  23.     OnStopBeingBuilt = function(self, builder, layer)
  24.         TEnergyCreationUnit.OnCreate(self)
  25.         local army = self:GetArmy()
  26.         for k, v in self.EffectBones01 do
  27.             CreateAttachedEmitter(self,v,army,'/effects/emitters/uec1501_smoke_01_emit.bp')
  28.         end            
  29.         for k, v in self.EffectBones02 do
  30.             CreateAttachedEmitter(self,v,army,'/effects/emitters/uec1501_smoke_02_emit.bp')
  31.         end    
  32.         ChangeState(self, self.ActiveState)            
  33.     end,
  34.  
  35.     ActiveState = State {
  36.         Main = function(self)
  37.             # Play the "Activate" sound
  38.             local myBlueprint = self:GetBlueprint()
  39.             if myBlueprint.Audio.Activate then
  40.                 self:PlaySound(myBlueprint.Audio.Activate)
  41.             end
  42.         end,
  43.  
  44.         OnInActive = function(self)
  45.             ChangeState(self, self.InActiveState)
  46.         end,
  47.     },
  48.  
  49.     InActiveState = State {
  50.         Main = function(self)
  51.         end,
  52.  
  53.         OnActive = function(self)
  54.             ChangeState(self, self.ActiveState)
  55.         end,
  56.     },
  57. }
  58.  
  59.  
  60. TypeClass = WEB1303
clone this paste RAW Paste Data