| Author | 
            Message | 
        
        
			| 
				
				 theevilovenmit 
				
				
					 Joined: Sun May 11, 2008 2:00 am Posts: 10 Location: canada bc
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						I tried making tiberium a while ago,  I made a lua digger tool for the purpose. Each time it shoots it checks for nearby particles within a certain mass range,  sets there lifetime to 1 to remove them and replaces them with heavy gold particles. Only problem is it makes the game lag a bit when there are lots of particles in the air. Code:    function Create(self)    end
  function Update(self)    for actor in MovableMan.Particles do    if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 95 and actor.Mass > 1.300 and actor.Mass < 1.400 then -- if somethings close and has the right weight       actor.Lifetime = 1 -- kill it next frame       local particle = CreateMOPixel("Particle Gold"); -- make a prototype       particle.Pos = actor.Pos;       particle.Vel = actor.Vel;       MovableMan:AddParticle(particle); -- make gold    end    end   
   
					
  
			 | 
		
		
			| Wed Jun 23, 2010 6:48 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Solace 
				
				
					 Joined: Sun Jun 10, 2007 2:05 am Posts: 426
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						Could you make it something that settles into (possibly heavy) gold? You'd have to dig it twice, but I think that's how I made my gold bullets that you could shoot someone with and then later mine. Shooting someone with straight gold just gives them money. 
					
  
			 | 
		
		
			| Wed Jun 23, 2010 7:14 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						@theevilovenmit : I don't understand Lua yet so where should I Attach that to make It work MaximDude wrote: In case you're wondering why your crystals are so weak in structure no matter how tough you make them is because the do not have background sprites. CC handles bunker modules without BGs like IsScrap junk that is laying around. So if I make a background it will make it stronger ? I'll try that  
					
  
			 | 
		
		
			| Wed Jun 23, 2010 8:45 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 theevilovenmit 
				
				
					 Joined: Sun May 11, 2008 2:00 am Posts: 10 Location: canada bc
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						The lua is executed by a tracer round that the digger fires. I set the digger to fire tracers once every 50th round,  which for a digger is every frame or so. Code: AddAmmo = AEmitter    PresetName = Particle Tiberium Lua    Mass = 0.08    OrientToVel = 0.9    HitsMOs = 0    GetsHitByMOs = 0    SpriteFile = ContentFile       FilePath = Base.rte/Null.bmp    LifeTime = 1   //  i gave this particle one frame to live,   so it only executes the lua once.    FrameCount = 1    SpriteOffset = Vector       X = 0       Y = 0    EntryWound = AEmitter       CopyOf = Dent Metal    ExitWound = AEmitter       CopyOf = Dent Metal    ScriptPath = Tiberium.rte/Tiberium.lua  // This is where you attach the lua.    AtomGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 2       Depth = 0    DeepGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 4       Depth = 1    DeepCheck = 0    AddEmission = Emission       EmittedParticle = MOPixel          CopyOf = Particle Very Heavy Digger       ParticlesPerMinute = 0       BurstSize = 1       Spread = 0.0       MaxVelocity = 95       MinVelocity = 95       PushesEmitter = 0    EmissionEnabled = 1    EmissionsIgnoreThis = 0    BurstTriggered = 1
  AddAmmo = Round    PresetName = Round Tiberium Tracer    ParticleCount = 1    Particle = AEmitter       CopyOf = Particle Tiberium Lua    Shell = None    FireVelocity = 15    ShellVelocity = -1    Separation = 5
  The lua checks for particles with a mass between 1.300 and 1.400. I created a material with a mass in between that, and assigned it to the tiberium terrain debris. Code: AddMaterial = Material    Index = 127    PresetName = Tiberium Riparius    Bounce = 0.1    Friction = 1    StructuralIntegrity = 190    DensityKGPerVolumeL = 5000    Stickiness = 0.1    DensityKGPerPixel = 1.350      // set your mass here    GibImpulseLimitPerVolumeL = 15    GibWoundLimitPerVolumeL = 0.1    Priority = 10000000    Color = Color       R = 248       G = 242       B = 66    UseOwnColor = 1
   
					
  
			 | 
		
		
			| Wed Jun 23, 2010 10:37 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						So all I have to do is make a material with a mass between 1.300 and 1.400 attach the lua to a tracer round of a digger and we are good to go ??
  does the racer have to be a emitter or can it be a MOpixel 
					
  
			 | 
		
		
			| Wed Jun 23, 2010 10:44 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 theevilovenmit 
				
				
					 Joined: Sun May 11, 2008 2:00 am Posts: 10 Location: canada bc
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						yes,   the mass should be in between in with .05 on either side to make room for error.
  I tried making it a smaller value,   eg: 1.400 - 1.450      with a material value of 1.425    and it couldn't detect it..
  I remember the aemitter being the only thing that would load the lua,   I'm probably wrong though.
  The aemitter in my digger emits a heavy digging mopixel during its frame,  so you end up with a nice MOpixel anyways. 
					
  
			 | 
		
		
			| Thu Jun 24, 2010 3:04 am | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						It doesn't work I have a very strong crystal that only the digger can dig (the custom one with the special tracer) and it digs the mineral but it does not change it into gold Here is the digger code  Code: AddAmmo = AEmitter    PresetName = Particle CrystalCutter    Mass = 0.08    OrientToVel = 0.9    HitsMOs = 0    GetsHitByMOs = 0    SpriteFile = ContentFile       FilePath = Base.rte/Null.bmp    LifeTime = 1   //  i gave this particle one frame to live,   so it only executes the lua once.    FrameCount = 1    SpriteOffset = Vector       X = 0       Y = 0    EntryWound = AEmitter       CopyOf = Dent Metal    ExitWound = AEmitter       CopyOf = Dent Metal    ScriptPath = Crystal.rte/CrystalCutter/Gold.lua  // This is where you attach the lua.    AtomGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 2       Depth = 0    DeepGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 4       Depth = 1    DeepCheck = 0    AddEmission = Emission    EmittedParticle = MOPixel       CopyOf = Particle Very Heavy Digger    ParticlesPerMinute = 0    BurstSize = 1       Spread = 0.0       MaxVelocity = 95       MinVelocity = 95       PushesEmitter = 0    EmissionEnabled = 1    EmissionsIgnoreThis = 0    BurstTriggered = 1
  AddAmmo = Round    PresetName = Round CrystalCutter    ParticleCount = 6    Particle = AEmitter       CopyOf = Particle CrystalCutter    Shell = None    FireVelocity = 15    ShellVelocity = -1    Separation = 5
  AddAmmo = Magazine    PresetName = Magazine CrystalCutter    Mass = 5    HitsMOs = 0    GetsHitByMOs = 0    SpriteFile = ContentFile       FilePath = Crystals.rte/CrystalCutter/CrystalCutterMag.bmp    FrameCount = 1    SpriteOffset = Vector       X = -2       Y = -2    ParentOffset = Vector       X = 3       Y = 2    EntryWound = AEmitter       CopyOf = Dent Metal    ExitWound = AEmitter       CopyOf = Dent Metal    AtomGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Bullet Metal       Resolution = 2       Depth = 0    DeepGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Bullet Metal       Resolution = 3       Depth = 1    DeepCheck = 0    JointStrength = 200    JointStiffness = 1    JointOffset = Vector       X = 0       Y = 0    DrawAfterParent = 0    RoundCount = 300    RTTRatio = 2    RegularRound = Round       CopyOf = Round CrystalCutter    TracerRound = Round       CopyOf = Round CrystalCutter
 
 
  AddDevice = HDFirearm    PresetName = Crystal Cutter    AddToGroup = Tools    Description = The only digger that can extract gold from crystals , the crystals needs to be mined twice for max profit    Mass = 6    HitsMOs = 0    GetsHitByMOs = 1    SpriteFile = ContentFile       FilePath = Crystals.rte/CrystalCutter/CrystalCutter.bmp    FrameCount = 1    SpriteOffset = Vector       X = -10       Y = -4    EntryWound = AEmitter       CopyOf = Dent Metal    ExitWound = AEmitter       CopyOf = Dent Metal    GoldValue = 80    AtomGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 4       Depth = 0    DeepGroup = AtomGroup       AutoGenerate = 1       Material = Material          CopyOf = Military Stuff       Resolution = 4       Depth = 10    DeepCheck = 0    JointStrength = 90    JointStiffness = 0.5    JointOffset = Vector       X = -2       Y = 3    DrawAfterParent = 0    OneHanded = 1    StanceOffset = Vector       X = 8       Y = 5    SharpStanceOffset = Vector       X = 10       Y = -5    SupportOffset = Vector       X = 3       Y = 3    SharpLength = 30    Magazine = Magazine       CopyOf = Magazine CrystalCutter       ParentOffset = Vector          X = -1          Y = -1    Flash = Attachable       CopyOf = Muzzle Flash SMG    FireSound = Sound       AddSample = ContentFile          FilePath = Base.rte/Devices/Diggers/DiggerSound.wav       LoopSetting = -1 // Means loop until stopped    EmptySound = Sound       AddSample = ContentFile          FilePath = Base.rte/Devices/EmptyClick3.wav    ReloadStartSound = Sound       AddSample = ContentFile          FilePath = Base.rte/Devices/ReloadStart.wav    ReloadEndSound = Sound       AddSample = ContentFile          FilePath = Base.rte/Devices/ReloadEnd.wav    RateOfFire = 2000    ReloadTime = 1800    FullAuto = 1    FireIgnoresThis = 1    ShakeRange = 2    SharpShakeRange = 1    NoSupportFactor = 2    ParticleSpreadRange = 4    ShellSpreadRange = 0    ShellAngVelRange = 0    MuzzleOffset = Vector       X = 11       Y = 0    EjectionOffset = Vector       X = 1       Y = -3    AddGib = Gib       GibParticle = MOPixel          CopyOf = Spark Yellow 1       Count = 6       Spread = 2.25       MaxVelocity = 20       MinVelocity = 8    AddGib = Gib       GibParticle = MOPixel          CopyOf = Spark Yellow 2       Count = 5       Spread = 2.25       MaxVelocity = 20       MinVelocity = 8    AddGib = Gib       GibParticle = MOPixel          CopyOf = Drop Oil       Count = 4       Spread = 2.25       MaxVelocity = 10       MinVelocity = 1    AddGib = Gib       GibParticle = MOSParticle          CopyOf = Gib Metal Rust Micro A       Count = 6       Spread = 2.25       MaxVelocity = 15       MinVelocity = 5    AddGib = Gib       GibParticle = MOSParticle          CopyOf = Gib Metal Grey Micro A       Count = 4       Spread = 2.25       MaxVelocity = 15       MinVelocity = 5    AddGib = Gib       GibParticle = MOSRotating          CopyOf = Gib Device Small I       Count = 1       Spread = 2.25       MaxVelocity = 10       MinVelocity = 1    GibWoundLimit = 4 And here the material Code: AddMaterial = Material    Index = 47    PresetName = Tiberium Riparius    Bounce = 0.1    Friction = 1    StructuralIntegrity = 190    DensityKGPerVolumeL = 5000    Stickiness = 0.1    DensityKGPerPixel = 1.355      // set your mass here    GibImpulseLimitPerVolumeL = 15    GibWoundLimitPerVolumeL = 0.1    Priority = 10000000    Color = Color       R = 180       G = 80       B = 32    UseOwnColor = 1 It worked for a while and then when I changed the other crystals mat it didn't work  
					
  
			 | 
		
		
			| Thu Jun 24, 2010 10:27 am | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 theevilovenmit 
				
				
					 Joined: Sun May 11, 2008 2:00 am Posts: 10 Location: canada bc
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						My apologys,   I didn't test my lua and script before sending it. at the end of the particle checking lua script you'll find  an: end end I suggest adding another  end       making: end end end It seems something wasn't properly ended,  and it didn't return the results.    adding the third end seemed to make things work. You should also include this particle reference,    it specifies the gold it should turn into. Code: AddAmmo = MOPixel //   this is the  "particle gold" referenced in the lua    PresetName = Particle Gold  // might as well call it Particle Crystal in both the lua and here.    Mass = 0.55     // the mass is the value multiplier,   doubling the mass will double its value.    RestThreshold = 500    HitsMOs = 1    GetsHitByMOs = 0    Color = Color       R = 2       G = 242       B = 66    Atom = Atom       Material = Material          CopyOf = Gold         // original material name          PresetName = GoldP  // Anything but plain gold will do to make it unique          Stickiness = 0.35       TrailColor = Color          R = 2          G = 242          B = 66       TrailLength = 3
  with a bit of messing about this should fix it. Hope it works,  I'm sorry for the inconvenience.  
					
  
			 | 
		
		
			| Thu Jun 24, 2010 12:47 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: "Bunker Modules"  
					
						It worked           thank you very very very very very much will update soon  
					
  
			 | 
		
		
			| Thu Jun 24, 2010 2:51 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Magzone 
				
				
					 Joined: Thu Apr 22, 2010 3:07 pm Posts: 19 Location: Finland, Middle of Nowhere
				 
				 
			 | 
			
				
				  Re: Crystals  
					
						Before posting any updates, you should probably check why only crystal A (the first big one) is diggable. I used the crystal cutter on every crystal and crystals B, C, D and E just reflected the cutter with no damage on the crystals itselves, and causing me to break 2 cutters.
  On second thougth, make B, C, D and E into bunker modules, like corridors and stuff. Shiny, indestructable bunkers! 
					
  
			 | 
		
		
			| Thu Jun 24, 2010 6:36 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: Crystals  
					
						That's funny mine doesn't have that problem mine work fine     the bunker modules sound like a great  Idea If someone has the same problem with some of the crystals not digable please post  
					
  
			 | 
		
		
			| Thu Jun 24, 2010 8:15 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 PARAN01A 
				
				
					 Joined: Wed Apr 07, 2010 12:29 pm Posts: 9
				 
				 
			 | 
			
				
				  Re: Crystals  
					
						Yup, they seem to be not digable. 
					
  
			 | 
		
		
			| Thu Jun 24, 2010 9:03 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: Crystals  
					
						Oh Um I will update soon with the bunker modules then we can see if I maybe uploaded the wrong thing all most done with the bunker modules I have to sprite 2 more things do the code test and I''ll upload  them
 
  Updated please post if there is still a problem with some crystals not able to be dug away 
					
  
			 | 
		
		
			| Thu Jun 24, 2010 11:44 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Magzone 
				
				
					 Joined: Thu Apr 22, 2010 3:07 pm Posts: 19 Location: Finland, Middle of Nowhere
				 
				 
			 | 
			
				
				  Re: Crystals + Modules  
					
						I tested the update, and now all crystals are diggable and give money. Including the bunker modules. I noticed that when digging crystals, the cutter takes a few hits even though only the tip of the beam touches the crystals, leading to the breaking of the tool. I even managed to break 2 cutters by digging some of the crystal away, leaving the background of the crystal in the place where it was, and digging the background. This doesn't happen with the bunker modules, so it is actually better idea to pile a big amount of blocks to a corner of a room and dig them instead of the crystals that were made to be dug. Also, I was able to dig the crystals a little bit with a heavy digger, making the crystals smaller while giving me no money. 
					
  
			 | 
		
		
			| Fri Jun 25, 2010 1:10 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 BrainChild 
				
				
					 Joined: Sun May 23, 2010 7:11 pm Posts: 193
				 
				 
			 | 
			
				
				  Re: Crystals + Modules  
					
						Magzone wrote: Also, I was able to dig the crystals a little bit with a heavy digger, making the crystals smaller while giving me no money. That's because the digger that I made has a piece of Lua attached that theevilovenmit gave me , it turns any particle with a specific mass into gold so thing of the digger as a mobile crystal refinery  
					
  
			 | 
		
		
			| Fri Jun 25, 2010 1:21 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
	
		 |