Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

U2XMP.ArtifactInvInvisibility


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
//=============================================================================
// $Workfile: ArtifactInvInvisibility.uc $
// Created By: Mark Poesch
// Created On: 6/22/2001
// $Author: Sbrown $
// $Date: 7/11/02 18:07 $
// $Revision: 6 $
//=============================================================================
class ArtifactInvInvisibility extends Artifact;

//ARL Import HUD icon
/*
var() float		MinInvisibility;    // (alpha) 0.5
var() float		MaxInvisibility;    // (alpha) 0.1
var() float		VelocityWeighting;  // 0.0 to 1.0: smaller numbers increase damping
var	  float		AverageSpeed;

//-----------------------------------------------------------------------------

function BeginEffect( Pawn Other )
{
	// Play Begin Sound
	Super.BeginEffect( Other );

	// Show Begin Effect
}

//-----------------------------------------------------------------------------

function EndEffect( Pawn Other )
{
	// Play End Sound
	Super.BeginEffect( Other );

	// Show End Effect
}

//-----------------------------------------------------------------------------

event Tick( float DeltaTime )
{
	local float		PercentMaxSpeed;
	local float		DeltaAverageSpeed;
	local float		AlphaBucket;

	Super.Tick( DeltaTime );	

	if( bActive )
	{
		DeltaAverageSpeed = VSize( Owner.Velocity ) * VelocityWeighting + AverageSpeed * ( 1.0 - VelocityWeighting );
		AverageSpeed = DeltaTime * DeltaAverageSpeed;
//		DM( "*** AverageSpeed = " $ AverageSpeed );
		PercentMaxSpeed = AverageSpeed;
//		PercentMaxSpeed = VSize( Owner.Velocity ) / Pawn(Owner).GroundSpeed;
//		DM( "*** PercentMaxSpeed = " $ PercentMaxSpeed );
		// AlphaBucket should be the pawn's alpha level
		AlphaBucket = MaxInvisibility + ( MinInvisibility - MaxInvisibility ) * PercentMaxSpeed;
		Pawn(Owner).Visibility = 128 * AlphaBucket; // 128 is defined as "normal" in Pawn.uc
//		DM( "*** Alpha = " $ AlphaBucket );
	}
}

//-----------------------------------------------------------------------------
*/

defaultproperties
{
	ArtifactIconName="ArtifactShowInvisible"
	ActivateSound=Sound'U2XMPA.ArtifactInvisibility.InvisibilityActivate'
	DeActivateSound=Sound'U2XMPA.ArtifactInvisibility.InvisibilityDeActivate'
	PickupClass=Class'U2XMP.ArtifactInvisibility'
	ItemName="Invisibility Artifact"
     UseReticleOnEvents(0)="UseReticleText"
     UseReticleOnEvents(1)="UseReticleCorners"
     UseReticleOnEvents(2)="UseReticleTopBars"
     ProximityReticleOnEvents(0)="ProximityReticleCorners"
     ProximityReticleOnEvents(1)="ProximityReticleTopBars"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:44.000 - Creation time: sk 3-1-2016 10:48:37.384 - Created with UnCodeX