Data Realms Fan Forums
http://45.55.195.193/

IsScrap denied. How to?
http://45.55.195.193/viewtopic.php?f=1&t=18906
Page 1 of 1

Author:  LordBistian [ Fri Jun 04, 2010 3:53 pm ]
Post subject:  IsScrap denied. How to?

I was just wondering. Can I have a physics affected object in CC which won't be turned to terrain if it lays around too long and cannot be controlled like an actor either?
If so, how would I do it? Also, would it be affected by conveyors? Would I be able to push and blast it around? Could I have it gib or have entry wounds? Can I disable its gibbing?

Thanks in advance for any help on this.

Author:  411570N3 [ Fri Jun 04, 2010 4:22 pm ]
Post subject:  Re: IsScrap denied. How to?

Yes. You'd probably still use an actor or use an MOSRotating or something of the sort, depending on exactly what it is. All of your asked questions can be done, but currently interactions between MOs including Actors are quite unstable, meaning it would not do well to have it walked upon.

Author:  LordBistian [ Fri Jun 04, 2010 4:36 pm ]
Post subject:  Re: IsScrap denied. How to?

Trying to make a Companion Cube.
Can be tossed around but wont break and most important of all, remains tossable.

Author:  411570N3 [ Fri Jun 04, 2010 4:56 pm ]
Post subject:  Re: IsScrap denied. How to?

Yeah, that's probably doable.

Author:  LordBistian [ Fri Jun 04, 2010 5:11 pm ]
Post subject:  Re: IsScrap denied. How to?

Urgh. I used a MOSRotating, and once it hits the floor it becomes terrain.
Is there anyway I can fix that?

[EDIT] got an ACRocket to work. But now theres another problem. It will eventually scuttle... I might change to Actor to fix that...
[EDIT2] Argh. Now it's a cube, invincible to Bullets, but not invincible to Bombs and Impacts. Any ideas how to make it completely invincible?

Author:  Commodore111 [ Sat Jun 05, 2010 12:12 am ]
Post subject:  Re: IsScrap denied. How to?

Set the GibImpulseLimit to something like 99999999999.

Author:  LordBistian [ Sat Jun 05, 2010 12:43 am ]
Post subject:  Re: IsScrap denied. How to?

Still suffers damage from kinetic impacts and Bombs.

Author:  Grif [ Sat Jun 05, 2010 12:56 am ]
Post subject:  Re: IsScrap denied. How to?

Turn it back into an MOSRotating.

Add this script to it:

function Create(self)
self.lifetimer = Timer();
end

function Update(self)
self.Age = 1;
self.ToSettle = false;
self.ToDelete = false;
if self.lifetimer:IsPastSimMS(10000) == true then
if self.Vel == Vector(0,0) then
self.Pos.Y = self.Pos.Y - 1;
end
end
end

Author:  LordBistian [ Sat Jun 05, 2010 1:15 am ]
Post subject:  Re: IsScrap denied. How to?

Code:
AddEffect = MOSRotating
   InstanceName = CompanionCube
   AddToGroup = Gibs
   Mass = 50.76
   Sharpness = 1
   HitsMOs = 1
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = LBBunker.rte/BunkerModules/Sprites/CompanionCubeFG.bmp
   ScriptPath = LBBunker.rte/BunkerModules/Scripts/CompanionCube.lua
   FrameCount = 1
   SpriteOffset = Vector
      X = 0
      Y = 0
   AngularVel = 6
   EntryWound = AEmitter
      CopyOf = Dent Metal Light
   ExitWound = AEmitter
      CopyOf = Dent Metal Light
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Metal
      Resolution = 4
      Depth = 0
   DeepCheck = 0

AddTerrainObject = TerrainObject
   PresetName = Companion Cube
   Description = A small metal cube that looks familiar.
   AddToGroup = Bunker Bits
   GoldValue = 40
   Buyable = 1
   FGColorFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeFG.bmp
   MaterialFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeFG2.bmp
   BGColorFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeFG2.bmp
   BitmapOffset = Vector
      X = 0
      Y = 0
   AddChildObject = SOPlacer
      PlacedObject = MOSRotating
         CopyOf = CompanionCube
      Offset = Vector
         X = 12
         Y = 12

AddTerrainObject = TerrainObject
   PresetName = Companion Block
   Description = The stationary version of the Companion Cube.
   AddToGroup = Bunker Bits
   GoldValue = 40
   Buyable = 1
   FGColorFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeFG.bmp
   MaterialFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeMat.bmp
   BGColorFile = ContentFile
      Path = LBBunker.rte/BunkerModules/Sprites/CompanionCubeBG.bmp
   BitmapOffset = Vector
      X = 0
      Y = 0


Still doesnt works ._.
It falls and becomes terrain.
Also, sorry for walloftextrape.

Author:  Petethegoat [ Sat Jun 05, 2010 1:23 am ]
Post subject:  Re: IsScrap denied. How to?

Open up the Lua console (~) and see if there are any errors.

Perhaps add self:MoveOutOfTerrain(); under function Update(self) somewhere?

Author:  Commodore111 [ Sat Jun 05, 2010 1:26 am ]
Post subject:  Re: IsScrap denied. How to?

Quote:
Still suffers damage from kinetic impacts and Bombs.


Set ImpulseDamageThreshold to 9999999999.

Author:  LordBistian [ Sat Jun 05, 2010 1:28 am ]
Post subject:  Re: IsScrap denied. How to?

Thanks, Commodore.
That fixed it.
Works fine now.

Author:  Laraso [ Fri Jun 11, 2010 2:36 am ]
Post subject:  Re: IsScrap denied. How to?

If by damage you mean it loses health, then the easiest way to fix that would to be to add this bit of lua to the cube:

Code:
function Update(self)   
   for actor in MovableMan.Actors do
      if actor.PresetName == "Companion Cube" then
         actor.Health = 100
      end
   end
end

Author:  411570N3 [ Fri Jun 11, 2010 5:55 am ]
Post subject:  Re: IsScrap denied. How to?

It is much more efficient to just set self.health = 100.

Author:  CrazyMLC [ Fri Jun 11, 2010 7:33 pm ]
Post subject:  Re: IsScrap denied. How to?

Just to explain what Allstone is saying:
Code:
function Update(self)   
   self.Health = 100
end

self is an automatic pointer (this is the correct term, right?) to the object the script is applied to.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/