UpakHealth issue

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
Status
Not open for further replies.

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
Okay, I am already done making updated version of MPCrashSite1 from ronald's conversion, I got rid of most bsp bugs and homs there, since he added some geometry like got rid of the mover platforms that are not there at harder difficulties (at the molten section before pipe entrance) and instead made them solid additive brushes, but that change also made the map more bsp unstable at least in HOMs.

I added back the proper UpakHealths too, making them fall out on the floor like in original and also made it fixed for online play so they will fall down too and not appear to be stuck in air (although that was just clientside bug online).

However....there is one issue, the healths will not respawn, because of the basechange and bump functions. I don't know why that is, don't ask me...but they don't respawn, any idea what really conflicts with the respawn in there?

The original code is following:
Code:
function Bump( actor Other )
{
	local float speed, oldZ;
	
	if( ( Other != None && !Other.IsA( 'Pawn' ) ) )
	{
		oldZ = Velocity.Z;
		speed = VSize(Other.Velocity);
		Velocity = Other.Velocity * FMin(120.0, 20 + speed)/speed;
		if ( Physics == PHYS_None ) {
			Velocity.Z = 25;
		}
		else
			Velocity.Z = oldZ;
		SetPhysics(PHYS_Falling);
	}
}


singular function BaseChange()
{
	local float decorMass, decorMass2;

	decormass= FMax(1, Mass);
	if( Velocity.Z < -500 )
		TakeDamage( (1-Velocity.Z/30),Instigator,Location,vect(0,0,0) , 'crushed');

	if( (base == None) && (Physics == PHYS_None) )
		SetPhysics(PHYS_Falling);
	else if( (Pawn(base) != None) && (Pawn(Base).CarriedDecoration != self) )
	{
		Base.TakeDamage( (1-Velocity.Z/400)* decormass/Base.Mass,Instigator,Location,0.5 * Velocity , 'crushed');
		Velocity.Z = 100;
		if (FRand() < 0.5)
			Velocity.X += 70;
		else
			Velocity.Y += 70;
		SetPhysics(PHYS_Falling);
	}
	else if( Decoration(Base)!=None && Velocity.Z<-500 )
	{
		decorMass2 = FMax(Decoration(Base).Mass, 1);
		Base.TakeDamage((1 - decorMass/decorMass2 * Velocity.Z/30), Instigator, Location, 0.2 * Velocity, 'stomped');
		Velocity.Z = 100;
		if (FRand() < 0.5)
			Velocity.X += 70;
		else
			Velocity.Y += 70;
		SetPhysics(PHYS_Falling);
	}
	else
	{
		SetPhysics( PHYS_Falling );
		instigator = None;
	}
}
 
Last edited:

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
You should log the thing out. See if it exists and if it spawns anything. Also check the log, it might not respawn if there is not enough room to do so.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
There is enough space for it to spawn, however, this happens when it tried to respawn:

Log: UPakHealth3 fell out of the world!
Log: UPakHealth6 fell out of the world!
 

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
Sounds like awkward collision or physics. Or possibly both. Usually to stop it from falling out of the world, you should have bCollideWorld set to true (this will make it so it doesn't fall out and it will automatically adjust to being on top of the ground if it spawns in it, but it might not spawn if it doesn't fit). Also making it bCollideWorld can have some strange effects, like in UT2004 vehicles can push them. So you'll have to experiment with this, either use bCollideWorld or don't use it, but use PHYS_None and make sure it doesn't move anywhere when it respawns.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
Phys none is already set to it when it respawns, there is override function for that...but I will see what I can do.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
It is already bcollideworld as well, so that is not the issue at all btw, and it wouldn't make a sense and it would fall out of the world straight away. It is something within the functions, the velocity stuff.
 

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
Well, then try standard debugging procedures - comment the suspect lines out, see if it works, and when it does, you'll know the offending line of code.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
I posted this elsewhere, but:

it is in basechange, it now worked when I changed something, but only partially, it respawned when it wasn't pushed by mover and when was it didn't, but I guess I am close now...but can't solve it still.


EDIT: I give up.....it is too much pain....and unrealed crashed, since i have the class myleveled anyway...until someone gives me solution I am putting this on hold. Really...**** this. I tried overriding touch and stuff like that. But I give up, I am tired of trying this over again with my health condition and only being disapointed with the result. I give up.
 
Status
Not open for further replies.