Page 1 of 1

How to prevent an Inventory to disappear when crushed?

Posted: Wed Oct 10, 2018 5:35 pm
by PrinceOfFunky
I just noticed weapon pickups disappear when a mover crushes them, how can I prevent this from happening?

Re: How to prevent an Inventory to disappear when crushed?

Posted: Wed Oct 10, 2018 6:17 pm
by Barbie
PrinceOfFunky wrote:I just noticed weapon pickups disappear when a mover crushes them, how can I prevent this from happening?
See code of mover (I guess that Inventory's owner is None):

Code: Select all

// Return true to abort, false to continue.
function bool EncroachingOn( actor Other ) {
...
	if ( Other.IsA('Fragment') || (Other.IsA('Inventory') && (Other.Owner == None)) )
	{
		Other.Destroy();
		return false;
	}
...
Use a custom mover; maybe you can manipulate existing code by XC_Engine.

Re: How to prevent an Inventory to disappear when crushed?

Posted: Fri Oct 12, 2018 12:05 am
by EvilGrins
Before you get crushed, throw all your weapons away!

Re: How to prevent an Inventory to disappear when crushed?

Posted: Fri Oct 12, 2018 6:49 am
by Higor
Tossed weapons should have bCollideWorld set to false.
The right question is: how you'll set that var at the right time?

Re: How to prevent an Inventory to disappear when crushed?

Posted: Fri Oct 12, 2018 3:45 pm
by PrinceOfFunky
Higor wrote:Tossed weapons should have bCollideWorld set to false.
The right question is: how you'll set that var at the right time?
I'm not talking about Weapons only, and not only about tossed weapons, a Mover is an Actor, so the problem is bCollideActor, which is needed if you want a pawn to pick that inventory up.