View unanswered posts | View active topics It is currently Sun Jun 16, 2024 2:17 am



Reply to topic  [ 8 posts ] 
 How to Prevent Crushing Death? 
Author Message
User avatar

Joined: Fri Jul 27, 2012 5:37 pm
Posts: 23
Reply with quote
Post How to Prevent Crushing Death?
Basically I want to make one of my actors (ACrab) stay alive after being smashed from above by ships or debris.
I've noticed it's an easy way to kill *any* actor I've seen so far.
Is it possible to apply some sort of preventative INI lines on an actor that already has impulse resistance?

Specifically what I intend is to have an ACrab immune to crushing and impulse, plus wounds everywhere except one "weak point" attachment.
I've covered wounds and impulse, while now it gets gibbed instantly by being pushed into terrain.


Sat Sep 15, 2012 3:23 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: How to Prevent Crushing Death?
As far as I know, there isn't any ini way to do this. The only way would be putting GetsHitByMOs = 0, but nothing would hit it then. Maybe you could tweak deepgroups and atomgroups, but again, I don't know how they work or what to do with them.

The only thing I imagine would work without many problems and would be "easier" to do, would by sticking a lua script to the ACrab, that would detect if there is any gib or debris via PresetName or something, and change their mass to something harmless even at huge speeds, like 0.0000001, if they are heading towards the actor.


Sat Sep 15, 2012 6:23 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: How to Prevent Crushing Death?
Well, setting MissionCritical = 1 essentially makes an object completely indestructible, even to crushing... And weak points. So it might not work in your favour. Haven't tested it on actors though, it's possible that they can lose health regardless. I have NO idea of what happens when their health reaches 0 though, if that's even possible.


Sun Sep 16, 2012 5:14 pm
Profile WWW
User avatar

Joined: Fri Jul 27, 2012 5:37 pm
Posts: 23
Reply with quote
Post Re: How to Prevent Crushing Death?
Shook wrote:
Well, setting MissionCritical = 1 essentially makes an object completely indestructible, even to crushing... And weak points. So it might not work in your favour. Haven't tested it on actors though, it's possible that they can lose health regardless. I have NO idea of what happens when their health reaches 0 though, if that's even possible.


Wait wait, setting what to MissionCritical =1?
Can it be just one attachment on an actor? If so, would that only make that attachment indestructible?
Doing it that way; setting all except one part would do what I mentioned, if that works.

Well, I gave up on my ACrab, too confusing to make it walk properly and need to learn more about walking and materials first.


Mon Sep 17, 2012 3:53 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: How to Prevent Crushing Death?
Well, it's only the torso suffering from crushing, but putting it on the limbs would make them indestructible too, i think. Haven't really messed with that variable.


Mon Sep 17, 2012 4:43 pm
Profile WWW

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: How to Prevent Crushing Death?
ImpulseDamageThreshold (high), GibImpulseLimit (high), and DeepCheck (to 1) are the three variables you need to set in the .ini.

Applying:
Code:
   self.ToDelete = false;
   self.Age = 1;
   self.ToSettle = false;
   self:NotResting();

to your actor every frame will prevent any other conceivable form of death as well.

I haven't heard of MissionCritical before, but it probably works too.


Tue Sep 18, 2012 11:55 pm
Profile WWW
User avatar

Joined: Fri Jul 27, 2012 5:37 pm
Posts: 23
Reply with quote
Post Re: How to Prevent Crushing Death?
I thought of this line I had to consider for one of my weapons, then, I GOT IT!!!

Add a high "RestThreshold" under the actor's ini entry.

Code:
AddActor = AHuman
   PresetName = Name
   AddToGroup = Actors
   Description = Stuff
   Buyable = 1
   RestThreshold = 90000000
   Sharpness = 0
   HitsMOs = 1
   GetsHitByMOs = 1


Works perfectly!
I recommend not setting this lower for immunity, my guy got crushed once at 900000.

Be aware that when the actor gets pushed toward the ground from above with nowhere to move,
they'll get pushed through the ground, leaving a hole in their path.


Wed Sep 26, 2012 5:39 pm
Profile
User avatar

Joined: Sat Jul 31, 2010 10:01 pm
Posts: 42
Reply with quote
Post Re: How to Prevent Crushing Death?
Using a RestThreshold of -1 should also work as an indefinite value. The only side-effect of using RestThreshold for this is, strangely enough, the main purpose of rest threshold, which is that when you finally DO kill it, if it doesn't gib, the corpse will stay as an MO and not settle to terrain.

A way around that would be attaching a script along the lines of

Code:
if self:IsDead() then
 self:GibThis();
end


Which would gib it on death, or you could do a pseudo-rest-check and settle, like

Code:
if self:IsDead() then
 if self.Vel == self.lastVel then
  self.ToSettle = true;
 end
end
self.lastVel = self.Vel;


And you'd be putting either of those in the function Update(self) block. For the second option you'd probably want to define self.lastVel as Vector(0,0) in the Create block. It's also a bit inaccurate, but when it's dead already shouldn't matter too much. There might be a way to use self.IsAtRest() but I haven't tried it myself.


Wed Sep 26, 2012 8:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 13 Queries | GZIP : Off ]