UnrealShare.ShieldBelt.TeamNum

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

UnrealShare.ShieldBelt.TeamNum

Post by Barbie »

Is there any explanation why UnrealShare.ShieldBelt.TeamNum is set to 3 when Level.Game.bTeamGame==false?

Code: Select all

class ShieldBelt extends Pickup;
...
function PickupFunction(Pawn Other)
{
	MyEffect = Spawn(class'ShieldBeltEffect', Owner,,Owner.Location, Owner.Rotation); 
	MyEffect.Mesh = Owner.Mesh;
	MyEffect.DrawScale = Owner.Drawscale;

	if ( Level.Game.bTeamGame && (Other.PlayerReplicationInfo != None) )
		TeamNum = Other.PlayerReplicationInfo.Team;
	else
		TeamNum = 3;
	SetEffectTexture();
}

function SetEffectTexture()
{
	if ( TeamNum != 3 )
		MyEffect.ScaleGlow = 0.5;
	else
		MyEffect.ScaleGlow = 1.0;
	MyEffect.Texture = TeamFireTextures[TeamNum];
	MyEffect.LowDetailTexture = TeamTextures[TeamNum];
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2749
Joined: Sat Mar 21, 2020 5:32 am

Re: UnrealShare.ShieldBelt.TeamNum

Post by Buggie »

Yes. If game not team game, shieldbelt must be gold color. 3 team is gold team.
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: UnrealShare.ShieldBelt.TeamNum

Post by Barbie »

So, reason is just the color?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2749
Joined: Sat Mar 21, 2020 5:32 am

Re: UnrealShare.ShieldBelt.TeamNum

Post by Buggie »

Yes. It happen in some other places as well I guess.
User avatar
Leo(T.C.K.)
Inhuman
Posts: 875
Joined: Sat Aug 13, 2011 10:26 pm

Re: UnrealShare.ShieldBelt.TeamNum

Post by Leo(T.C.K.) »

Indeed. The ShieldBelt was made with gold color in mind though originally the effect looked a bit different. And before the gold effect it had actually an animated effect of when the player would get hit (in late 1997 beta versions), the shieldbelt would spawn an effect of a globe encompassing the player made of small particles. This effect I reused for the ImplantGun implementation for Unreal PSX Rework. The altfire of the gun, when it creates that pushing away effect...that what is spawned is actually a smaller version of the old shieldbelt effect. This thing would play each time player took damage.

In earlier even released versions of Unreal, like the Vanilla 200 version, it even lacked teamcolor skins which was complained about so Epic changed it. Because if someone had a shieldbelt you had no idea what team he was on.
Post Reply