AddActor = Actor PresetName = Ejector Pod (Light) Team = 0// 1// 2// 3// Mass = 100 RestThreshold = -500 HitsMOs = 0 GetsHitByMOs = 0 SpriteFile = ContentFile FilePath = ACTA.rte/Actors/Pilot/Pod.bmp FrameCount = 1 SpriteOffset = Vector X = -9 Y = -14 AngularVel = 6 EntryWound = AEmitter CopyOf = Dent Metal Light ExitWound = AEmitter CopyOf = Dent Metal Light AtomGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Metal Resolution = 1 Depth = 0 DeepGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Metal Resolution = 4 Depth = 6 DeepCheck = 1 Status = 0 Health = 100 Team = 0// 1// 2// 3// AimAngle = 0 AimDistance = 0 CharHeight = 50 HolsterOffset = Vector X = -0 Y = -0 AddGib = Gib GibParticle = ACDropShip CopyOf = Pilot Release Count = 1 Spread = 3.14 MaxVelocity = 20 MinVelocity = 20 InheritsVel = 0 GibSound = Sound AddSample = ContentFile FilePath = Base.rte/Sounds/Explode2.wav Priority = 2 GibImpulseLimit = 1
if without a Team = 1 for the actor(s), they'll be as a neutral team though, it stills remain a Red team even I plays as a other team. Is there any lua for this?
Sat Dec 20, 2014 2:40 pm
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
Re: Pilot Ejection
There are many ways to do this. The only problem I see is that with Lua, detecting the pilot and his escape craft would be somewhat complicated since they are all gibs, so if you attach the script to the DropShip and make it trigger on it's destruction, it won't be able to change the team of the pilot.
I'm not really sure of why the craft gib into a MOSRotating that then gibs into the ACDropShip instead of gibbing the craft into the ACDropShip right away. In case this doesn't really matter, the "easy" option would be directly creating all the things with Lua:
Code:
function Create(self) self.eject = CreateACDropShip("Pilot Release"); self.eject.Team = self.Team; self.pilot = CreateAHuman("R-FP 44-1C"); self.pilot.Team = self.Team; self.pilot:AddInventoryItem(CreateHDFirearm("PL2-Kl")); self.eject:AddInventoryItem(self.pilot); end
function Destroy(self) self.eject.Pos = self.Pos; self.eject.Vel = self.Vel; --to give it an inertia-like movement when spawned MovableMan:AddActor(self.eject); end
Something like that would be enough.
Sat Dec 20, 2014 9:31 pm
Silent00
Joined: Tue Oct 15, 2013 8:13 am Posts: 93
Re: Pilot Ejection
thanks, does it have eject more at once?
Sun Dec 21, 2014 8:27 am
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
Re: Pilot Ejection
I didn't get your question, you mean if it can eject more than one pilot/escpae pod at once? Yeah, you can.
Mon Dec 22, 2014 2:18 am
Silent00
Joined: Tue Oct 15, 2013 8:13 am Posts: 93
Re: Pilot Ejection
but how?
Mon Dec 22, 2014 9:08 am
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
Re: Pilot Ejection
Simply defining more ejects and pilots, though you'd have to be careful to place the ejection things in such way that they won't overlap with each other, since that would cause them to explode or something.
function Destroy(self) self.eject.Pos = self.Pos + Vector(-30,0); -- this (-30,0) vector is just a place holder, replace it for a better value later self.eject.Vel = self.Vel;
MovableMan:AddActor(self.eject); MovableMan:AddActor(self.eject2); end
That would allow you to bring out more escape pods. If you'd like to add more, you simply have to copy and paste the obviously copy/pasted chunk and rename the variables (adding a number at the end).
Mon Dec 22, 2014 8:44 pm
Silent00
Joined: Tue Oct 15, 2013 8:13 am Posts: 93
Re: Pilot Ejection
Ok, I made this, but when the dropships left in the orbit, it left a pod instead along with it. It must've been only deleting AC.
Tue Dec 23, 2014 2:51 am
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
Re: Pilot Ejection
I'm not sure if a health check would be enough because instant gibbing might not set the health of the craft to 0. Maybe a height check?
function Destroy(self) if self.Pos.Y > 0 then self.eject.Pos = self.Pos + Vector(-30,0); -- this (-30,0) vector is just a place holder, replace it for a better value later self.eject.Vel = self.Vel;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum