Prepare fixtures
This commit is contained in:
parent
797e5ea192
commit
9c94356263
6021 changed files with 722805 additions and 22 deletions
127
kf_sources/SideshowScript/Classes/Deco_AirShip.uc
Normal file
127
kf_sources/SideshowScript/Classes/Deco_AirShip.uc
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
class Deco_AirShip extends Decoration;
|
||||
|
||||
#exec OBJ LOAD FILE=Pier_anim.ukx
|
||||
|
||||
var KFEventListener PlayLandEvent;
|
||||
var KFEventListener PlayTakeOffEvent;
|
||||
|
||||
var name ClientAnim;
|
||||
|
||||
var() name LandEventName, TakeOffEventName;
|
||||
|
||||
struct AnimRepInfo
|
||||
{
|
||||
var name AnimName; // The name of the animation to play
|
||||
var float StartTime; // The in game time that the animation first began playing
|
||||
};
|
||||
|
||||
var AnimRepInfo AnimInfo;
|
||||
|
||||
replication
|
||||
{
|
||||
reliable if( Role == ROLE_Authority )
|
||||
AnimInfo;
|
||||
}
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
// Starts the airship in the sky
|
||||
PlayAnim( 'Land', 1.0f );
|
||||
StopAnimating();
|
||||
SetUpListeners();
|
||||
}
|
||||
|
||||
// Create actors to tell us when an event is called
|
||||
function SetUpListeners()
|
||||
{
|
||||
PlayLandEvent = Spawn( class 'KFEventListener' );
|
||||
PlayTakeOffEvent = Spawn( class 'KFEventListener' );
|
||||
|
||||
PlayLandEvent.SetEventListenerInfo( self, LandEventName );
|
||||
PlayTakeOffEvent.SetEventListenerInfo( self, TakeOffEventName );
|
||||
}
|
||||
|
||||
// Called when an event listener's tag is called on the server
|
||||
function ReceivedEvent( name EventName )
|
||||
{
|
||||
local AnimRepInfo TempRepInfo;
|
||||
local KFGameType KFGame;
|
||||
|
||||
if ( EventName == LandEventName )
|
||||
{
|
||||
TempRepInfo.AnimName = 'Land';
|
||||
}
|
||||
else if ( EventName == TakeOffEventName )
|
||||
{
|
||||
TempRepInfo.AnimName = 'TakeOff';
|
||||
}
|
||||
|
||||
KFGame = KFGameType(Level.Game);
|
||||
|
||||
if ( KFGame != none )
|
||||
{
|
||||
// Get the elapsed time that the airship animation began playing
|
||||
TempRepInfo.StartTime = float( KFGame.ElapsedTime );
|
||||
}
|
||||
|
||||
AnimInfo = TempRepInfo; // Replicates AnimInfo To the client
|
||||
|
||||
// Play animations if offline
|
||||
if ( Level.NetMode != NM_DedicatedServer )
|
||||
{
|
||||
ClientPlayAnim( AnimInfo.AnimName, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
simulated function PostNetReceive()
|
||||
{
|
||||
local float CurrentAnimTime;
|
||||
local PlayerController PC;
|
||||
local GameReplicationInfo GRI;
|
||||
|
||||
if ( ClientAnim != AnimInfo.AnimName )
|
||||
{
|
||||
ClientAnim = AnimInfo.AnimName;
|
||||
|
||||
PC = Level.GetLocalPlayerController();
|
||||
|
||||
if ( PC != none )
|
||||
{
|
||||
GRI = PC.GameReplicationInfo;
|
||||
|
||||
if ( GRI != none )
|
||||
{
|
||||
// Get the time elapsed upon receiving the newest animation
|
||||
//( This is done to play an animation part in synch with everyone else, if a player joins late )
|
||||
CurrentAnimTime = float( GRI.ElapsedTime ) - AnimInfo.StartTime;
|
||||
}
|
||||
}
|
||||
|
||||
ClientPlayAnim( AnimInfo.AnimName, CurrentAnimTime );
|
||||
}
|
||||
}
|
||||
|
||||
simulated function ClientPlayAnim( name AnimName, float CurrentAnimTime )
|
||||
{
|
||||
local float CurrentAnimProgress; // Value from 0.0-1.0
|
||||
|
||||
CurrentAnimProgress = CurrentAnimTime / GetAnimDuration( AnimName, 1.0f );
|
||||
|
||||
PlayAnim( AnimName, 1.0f );
|
||||
SetAnimFrame( CurrentAnimProgress );
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
LandEventName=AirshipLandEvent
|
||||
TakeOffEventName=AirshipTakeOffEvent
|
||||
RemoteRole=ROLE_SimulatedProxy
|
||||
bNetNotify=true
|
||||
|
||||
bStatic=False
|
||||
bStasis=False
|
||||
Mesh=SkeletalMesh'Pier_anim.AirShip_Main'
|
||||
bNoDelete=true
|
||||
bAlwaysRelevant=true
|
||||
NetUpdateFrequency=1
|
||||
}
|
||||
19
kf_sources/SideshowScript/Classes/Deco_FerrisWheel.uc
Normal file
19
kf_sources/SideshowScript/Classes/Deco_FerrisWheel.uc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
class Deco_FerrisWheel extends Decoration;
|
||||
|
||||
#exec OBJ LOAD FILE=Pier_anim.ukx
|
||||
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
LoopAnim('Ferriswheel_Spin');
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bStasis=False
|
||||
Mesh=SkeletalMesh'Pier_anim.Ferriswheel'
|
||||
bNoDelete=True
|
||||
RemoteRole=ROLE_None
|
||||
}
|
||||
19
kf_sources/SideshowScript/Classes/Deco_SkyboxAirShips.uc
Normal file
19
kf_sources/SideshowScript/Classes/Deco_SkyboxAirShips.uc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
class Deco_SkyboxAirShips extends Decoration;
|
||||
|
||||
#exec OBJ LOAD FILE=Pier_anim.ukx
|
||||
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
LoopAnim('AirShips_Fly');
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bStasis=False
|
||||
Mesh=SkeletalMesh'Pier_anim.Airships'
|
||||
bNoDelete=True
|
||||
RemoteRole=ROLE_None
|
||||
}
|
||||
51
kf_sources/SideshowScript/Classes/Emitter_OilFountain.uc
Normal file
51
kf_sources/SideshowScript/Classes/Emitter_OilFountain.uc
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
class Emitter_OilFountain extends Emitter;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=SpriteEmitter Name=OilSplash
|
||||
SpinParticles=True
|
||||
UseSizeScale=True
|
||||
UseRegularSizeScale=False
|
||||
UniformSize=True
|
||||
AutomaticInitialSpawning=False
|
||||
Acceleration=(Z=-92.500000)
|
||||
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
|
||||
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
|
||||
MaxParticles=8
|
||||
Name="Splash"
|
||||
StartLocationRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=-85.000000,Max=-85.000000))
|
||||
SpinsPerSecondRange=(X=(Min=0.100000,Max=0.100000))
|
||||
StartSpinRange=(X=(Min=-1.000000,Max=1.000000))
|
||||
SizeScale(0)=(RelativeTime=1.000000,RelativeSize=2.500000)
|
||||
StartSizeRange=(X=(Min=20.000000,Max=20.000000),Y=(Min=5.000000,Max=5.000000),Z=(Min=5.000000,Max=5.000000))
|
||||
InitialParticlesPerSecond=4.000000
|
||||
DrawStyle=PTDS_AlphaBlend
|
||||
Texture=Texture'Pier_T.Particles.OilSplashTex'
|
||||
LifetimeRange=(Min=1.250000,Max=1.250000)
|
||||
StartVelocityRange=(X=(Min=-15.000000,Max=15.000000),Y=(Min=-15.000000,Max=15.000000),Z=(Min=35.000000,Max=50.000000))
|
||||
End Object
|
||||
|
||||
Begin Object Class=SpriteEmitter Name=OilDrip
|
||||
UseSizeScale=True
|
||||
UseRegularSizeScale=False
|
||||
UniformSize=True
|
||||
AutomaticInitialSpawning=False
|
||||
Acceleration=(Z=-50.000000)
|
||||
ColorScale(0)=(Color=(B=255,G=255,R=255,A=255))
|
||||
ColorScale(1)=(RelativeTime=1.000000,Color=(B=255,G=255,R=255,A=255))
|
||||
MaxParticles=8
|
||||
Name="OilStream"
|
||||
SizeScale(0)=(RelativeTime=1.000000,RelativeSize=4.000000)
|
||||
StartSizeRange=(X=(Min=8.000000,Max=10.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000))
|
||||
InitialParticlesPerSecond=2.000000
|
||||
DrawStyle=PTDS_AlphaBlend
|
||||
Texture=Texture'Pier_T.Particles.OilDripTex'
|
||||
LifetimeRange=(Min=2.000000,Max=2.000000)
|
||||
StartVelocityRange=(Z=(Min=-10.000000))
|
||||
End Object
|
||||
|
||||
Emitters(0)=OilDrip
|
||||
Emitters(1)=OilSplash
|
||||
}
|
||||
|
||||
|
||||
28
kf_sources/SideshowScript/Classes/Inv_GoldBar.uc
Normal file
28
kf_sources/SideshowScript/Classes/Inv_GoldBar.uc
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
Inv_GoldBar
|
||||
--------------------------------------------------------------
|
||||
|
||||
Carryable Gold bar item for an Escort the VIP style objective
|
||||
in the 2013 Summer Sideshow map
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Inv_GoldBar extends KF_StoryInventoryItem;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
bRender1PMesh = false
|
||||
|
||||
bUseForcedGroundSpeed = true
|
||||
ForcedGroundSpeed =120.0 // always go this speed when carrying gold bars!
|
||||
|
||||
AttachmentClass = none; // gold bars have no visible attachment when carried!
|
||||
PickupClass = Class 'Pickup_GoldBar'
|
||||
|
||||
CarriedMaterial = Texture 'Pier_T.Icons.Goldbar_Icon_64'
|
||||
GroundMaterial = Texture 'Pier_T.Icons.Goldbar_Icon_64'
|
||||
}
|
||||
97
kf_sources/SideshowScript/Classes/KF_DropInventoryVolume.uc
Normal file
97
kf_sources/SideshowScript/Classes/KF_DropInventoryVolume.uc
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
KF_DropInventoryVolume
|
||||
--------------------------------------------------------------
|
||||
|
||||
This volume forces pawns which touch it to drop any items they may
|
||||
be carrying of the specified type.
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class KF_DropInventoryVolume extends Volume;
|
||||
|
||||
/* The type of item that gets dropped */
|
||||
var () class<Inventory> DropInventoryType;
|
||||
|
||||
/* Attempt to throw the inventory item toward this actor */
|
||||
var () Actor DropTargetLoc;
|
||||
|
||||
/* Amount of offset to apply to drop target loc */
|
||||
var () float DropTargetOffset;
|
||||
|
||||
var array<Pickup> RepositionedPickups;
|
||||
|
||||
|
||||
simulated event Touch( Actor Other )
|
||||
{
|
||||
local Pawn TouchPawn;
|
||||
local Inventory Inv;
|
||||
local vector TargetVelocity;
|
||||
local vector DropFromLoc;
|
||||
local Vector X,Y,Z;
|
||||
local Pickup P;
|
||||
local vector RandOffset;
|
||||
|
||||
/* Cause pawns to toss their pickups */
|
||||
|
||||
TouchPawn = Pawn(Other);
|
||||
if(TouchPawn != none)
|
||||
{
|
||||
TouchPawn.GetAxes(Rotation,X,Y,Z);
|
||||
|
||||
for( Inv=TouchPawn.Inventory; Inv!=None; Inv=Inv.Inventory )
|
||||
{
|
||||
if(Inv.IsThrowable() && ClassIsChildOf(Inv.Class,DropinventoryType))
|
||||
{
|
||||
TargetVelocity = Vector(TouchPawn.Rotation)* 250.f;
|
||||
DropFromLoc = TouchPawn.Location + 0.8 * TouchPawn.CollisionRadius * X - 0.5 * TouchPawn.CollisionRadius * Y ;
|
||||
Inv.Velocity = TargetVelocity ;
|
||||
Inv.DropFrom(DropFromLoc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reposition tossed pickups */
|
||||
|
||||
P = Pickup(Other);
|
||||
if(P != none && P.InventoryType == DropInventoryType && !AlreadyRepositioned(P))
|
||||
{
|
||||
if(DropTargetLoc != none &&
|
||||
!DropTargetLoc.bBlockActors &&
|
||||
DropTargetLoc.Location != vect(0,0,0))
|
||||
{
|
||||
RepositionedPickups[RepositionedPickups.length] = P;
|
||||
|
||||
RandOffset.X = FRand() * DropTargetOffset;
|
||||
RandOffset.Y = FRand() * DropTargetOffset;
|
||||
|
||||
P.SetLocation(DropTargetLoc.Location + Vect(0,0,1)*P.CollisionHeight + RandOffset) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bool AlreadyRepositioned(Pickup P)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for( i = 0 ; i < RepositionedPickups.length ; i ++)
|
||||
{
|
||||
if(RepositionedPickups[i] != none &&
|
||||
RepositionedPickups[i] == P)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DropTargetOffset = 64.f
|
||||
}
|
||||
|
||||
398
kf_sources/SideshowScript/Classes/KF_RingMasterNPC.uc
Normal file
398
kf_sources/SideshowScript/Classes/KF_RingMasterNPC.uc
Normal file
|
|
@ -0,0 +1,398 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
KF_RingMasterNPC
|
||||
--------------------------------------------------------------
|
||||
|
||||
A helpeless old man.
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
class KF_RingMasterNPC extends KF_StoryNPC_Spawnable;
|
||||
|
||||
/* Achievement Specific Variable */
|
||||
var int TimesHit; // Increments each time the ring master is hit
|
||||
var int MaxTimesHit; // Number of hits it takes to fail a ringmaster achievement
|
||||
var bool bFailedAchievement; // The ring master will never get this achievement... he failed...
|
||||
|
||||
/* Anim to play when this NPC is scared / taking damage */
|
||||
var name CowerAnim;
|
||||
|
||||
/* Anim to play when this NPC is seated on the ground & inactive */
|
||||
var name IdleSeatedAnim;
|
||||
|
||||
/* Anim to play when this NPC is idle and standing */
|
||||
var name IdleStandingAnim;
|
||||
|
||||
/* Anim to play when this NPC is idle and standing but is very hurt */
|
||||
var name IdleStandingInjuredAnim;
|
||||
|
||||
/* Anim to play when this NPC gets up off the ground */
|
||||
var name StandUpAnim;
|
||||
|
||||
/* If true, play standup anim */
|
||||
var bool bFirstActivation;
|
||||
|
||||
var float LastCowerTime;
|
||||
|
||||
/* An array of sounds specifically for bleeding */
|
||||
var() Array<Sound> BleedingSounds;
|
||||
|
||||
var float MinTimeBetweenBleedSounds;
|
||||
var float LastBleedSoundTime;
|
||||
|
||||
var float LastBleedOutTime, BleedOutInterval;
|
||||
|
||||
replication
|
||||
{
|
||||
reliable if (Role == Role_Authority)
|
||||
bFirstActivation;
|
||||
}
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
log("*** SPAWNED RINGMASTER *** "@self);
|
||||
|
||||
// Scale bleed out by difficulty if you want to
|
||||
if ( Role == ROLE_Authority && Level.Game != none )
|
||||
{
|
||||
// Set difficulty based values
|
||||
if ( Level.Game.GameDifficulty >= 7.0 ) // Hell on Earth
|
||||
{
|
||||
BleedOutInterval *= 0.5;
|
||||
}
|
||||
else if ( Level.Game.GameDifficulty >= 5.0 ) // Suicidal
|
||||
{
|
||||
BleedOutInterval *= 0.5;
|
||||
}
|
||||
else if ( Level.Game.GameDifficulty >= 4.0 ) // Hard
|
||||
{
|
||||
BleedOutInterval *= 0.5;
|
||||
}
|
||||
else if ( Level.Game.GameDifficulty >= 2.0 ) // Normal
|
||||
{
|
||||
BleedOutInterval *= 0.75;
|
||||
}
|
||||
else //if ( GameDifficulty == 1.0 ) // Beginner
|
||||
{
|
||||
BleedOutInterval *= 1.0;
|
||||
}
|
||||
|
||||
// Playercount Scaling. Make the guy bleed slower if there are fewer player
|
||||
if( Level.Game.NumPlayers == 1 )
|
||||
{
|
||||
BleedOutInterval *= 1.5;
|
||||
}
|
||||
else if( Level.Game.NumPlayers <= 3 )
|
||||
{
|
||||
BleedOutInterval *= 1.25;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Reset()
|
||||
{
|
||||
Super.Reset();
|
||||
bFirstActivation = false;
|
||||
}
|
||||
|
||||
simulated function Tick(float DeltaTime)
|
||||
{
|
||||
// log(self@" Active ? ::: "@bActive);
|
||||
|
||||
if(bActive && Level.TimeSeconds - LastBleedOutTime > BleedOutInterval)
|
||||
{
|
||||
LastBleedOutTime = Level.TimeSeconds;
|
||||
TakeDamage(5,self,Location + Vect(0,0,1)*CollisionHeight,vect(0,0,0),class 'DamTypeBleedOut');
|
||||
}
|
||||
|
||||
Super.Tick(DeltaTime);
|
||||
|
||||
/* Update his idle state to reflect his injuries , etc. */
|
||||
IdleRestAnim = GetIdleAnim();
|
||||
IdleWeaponAnim = IdleRestAnim;
|
||||
}
|
||||
|
||||
function PlayTakeHit(vector HitLocation, int Damage, class<DamageType> DamageType)
|
||||
{
|
||||
// Do not play the ringmasters pain sound from bleeding damage
|
||||
if ( class<DamTypeBleedOut>( damageType ) == none )
|
||||
{
|
||||
Super.PlayTakeHit( HitLocation, Damage, DamageType );
|
||||
return;
|
||||
}
|
||||
|
||||
if( Level.TimeSeconds - LastBleedSoundTime < MinTimeBetweenBleedSounds )
|
||||
return;
|
||||
|
||||
LastBleedSoundTime = Level.TimeSeconds;
|
||||
// the ringmaster will play his specific bleeding sound
|
||||
PlaySound( BleedingSounds[ Rand ( BleedingSounds.Length ) ],,1.75 );
|
||||
}
|
||||
|
||||
simulated function AddHealth()
|
||||
{
|
||||
local int tempHeal ;
|
||||
if((level.TimeSeconds - lastHealTime) >= 0.1)
|
||||
{
|
||||
//log("AddHealth HealthToGive = "$HealthToGive$" Health = "$Health);
|
||||
|
||||
if(Health < HealthMax)
|
||||
{
|
||||
tempHeal = int(20 * (level.TimeSeconds - lastHealTime)) ;
|
||||
if(tempHeal>0)
|
||||
lastHealTime = level.TimeSeconds ;
|
||||
|
||||
//log("AddHealth adding "$tempHeal$" health");
|
||||
|
||||
Health = Min(Health+tempHeal, HealthMax);
|
||||
HealthToGive -= tempHeal ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastHealTime = level.timeSeconds ;
|
||||
// if we are all healed, there's gonna be no more healing
|
||||
HealthToGive = 0 ;
|
||||
log("AddHealth all healed Health = "$Health);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType, optional int HitIdx )
|
||||
{
|
||||
// Reduce damage for zombie attacks
|
||||
if( (class<DamTypeZombieAttack>(damageType) != none || class<DamTypeBurned>(damageType) != none
|
||||
|| class<DamTypeLawRocketImpact>(damageType) != none) && Damage >= 4 )
|
||||
{
|
||||
Damage *= 0.25;
|
||||
}
|
||||
|
||||
// Cancel out the 5 we are going to lose when TakeDamage is called in the super
|
||||
// This is done so that healing works better for the Ringmaster, as his constant
|
||||
// bleedout is making healing not work well
|
||||
if( damageType == class'DamTypeBleedOut' && healthToGive > 0 )
|
||||
{
|
||||
healthtoGive+=5;
|
||||
}
|
||||
|
||||
//log("Taking "$Damage$" damage of type "$damageType);
|
||||
|
||||
// pushing the Ringmaster off his path can be problematic, so zero the momentum
|
||||
super.TakeDamage( Damage, instigatedBy, hitlocation, vect(0,0,0), damageType, HitIdx );
|
||||
|
||||
if ( InstigatedBy != none && !InstigatedBy.IsHumanControlled() )
|
||||
{
|
||||
CheckObjectiveAchievements( damageType );
|
||||
}
|
||||
}
|
||||
|
||||
function CheckObjectiveAchievements( class<DamageType> damageType )
|
||||
{
|
||||
local KFSteamStatsAndAchievements KFSteamStats;
|
||||
local Controller C;
|
||||
local KFGameReplicationInfo KFGRI;
|
||||
|
||||
if ( class<DamTypeBleedOut>( damageType ) == none )
|
||||
{
|
||||
TimesHit += 1;
|
||||
if ( TimesHit >= MaxTimesHit && !bFailedAchievement )
|
||||
{
|
||||
bFailedAchievement = true;
|
||||
|
||||
KFGRI = KFGameReplicationInfo( Level.GRI );
|
||||
if( KFGRI != none )
|
||||
{
|
||||
KFGRI.bObjectiveAchievementFailed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OnObjectiveChanged(name OldObjectiveName, name NewObjectiveName)
|
||||
{
|
||||
if ( NewObjectiveName == 'DefendRingMaster' )
|
||||
{
|
||||
TimesHit = 0;
|
||||
bFailedAchievement = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wrapper for retrieving the type of idle animation the Ringmaster should play at the moment */
|
||||
simulated function name GetIdleAnim()
|
||||
{
|
||||
if(!bActive && !bFirstActivation)
|
||||
{
|
||||
return IdleSeatedAnim;
|
||||
}
|
||||
|
||||
return IdleStandingInjuredAnim;
|
||||
}
|
||||
|
||||
simulated event SetAnimAction(name NewAction)
|
||||
{
|
||||
if (!bWaitForAnim)
|
||||
{
|
||||
AnimAction = NewAction;
|
||||
if ( AnimAction == StandUpAnim )
|
||||
{
|
||||
bWaitForAnim = true;
|
||||
AnimBlendParams(0, 1.0, 0.0, 0.2, FireRootBone);
|
||||
PlayAnim(AnimAction,1.f, 0.0, 1);
|
||||
}
|
||||
else if(NewAction == CowerAnim )
|
||||
{
|
||||
AnimBlendParams(1, 1.0, 0.0, 0.2, FireRootBone);
|
||||
PlayAnim(AnimAction,1.f, 0.0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
super.SetAnimAction(NewAction);
|
||||
}
|
||||
|
||||
simulated Function PostNetBeginPlay()
|
||||
{
|
||||
local PlayerController LocalPlayer;
|
||||
local HUD_Storymode MyStoryHUD;
|
||||
local int i;
|
||||
|
||||
super.PostNetBeginPlay();
|
||||
|
||||
/* MEGA HACK!!!!!!!! *================================================*/
|
||||
|
||||
LocalPlayer = Level.GetLocalPlayerController();
|
||||
if(LocalPlayer != none)
|
||||
{
|
||||
MyStoryHUD = HUD_StoryMode(LocalPlayer.myHUD) ;
|
||||
if(MyStoryHUD != none)
|
||||
{
|
||||
for( i = 0; i < MyStoryHUD.ConditionHints.length; i++)
|
||||
{
|
||||
if(MyStoryHUD.ConditionHints[i].ConditionLoc == none &&
|
||||
MyStoryHUD.ConditionHints[i].PendingLocActorTag != '')
|
||||
{
|
||||
MyStoryHUD.ConditionHints[i].ConditionLoc = self;
|
||||
MyStoryHUD.ConditionHints[i].PendingLocActorTag = '' ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Only do the arm flailing animation if a ZED is attacking */
|
||||
simulated function PlayDirectionalHit(Vector HitLoc)
|
||||
{
|
||||
if(LasthitBy != none &&
|
||||
LastHitBy.IsA('KFMonsterController') &&
|
||||
Level.TimeSeconds - LastCowerTime >= GetAnimDuration(CowerAnim,1.f))
|
||||
{
|
||||
LastCowerTime = Level.TimeSeconds;
|
||||
SetAnimAction(CowerAnim);
|
||||
}
|
||||
}
|
||||
|
||||
function SetActive(bool On)
|
||||
{
|
||||
Super.SetActive(On);
|
||||
if(bActive && !bFirstActivation)
|
||||
{
|
||||
bFirstActivation = true;
|
||||
}
|
||||
}
|
||||
|
||||
event Bump( actor Other )
|
||||
{
|
||||
local vector PushVelocity;
|
||||
|
||||
if ( Velocity != vect(0,0,0) )
|
||||
{
|
||||
// cheap and dirty encroachment
|
||||
if ( Other.Physics == PHYS_Walking && KFHumanPawn(Other) != None )
|
||||
{
|
||||
//log( self$" BUMPED "$Other );
|
||||
|
||||
if( normal(Velocity) dot normal(Other.Location - Location) >= 0.7 )
|
||||
{
|
||||
PushVelocity = Normal( Other.Location - Location ) * 150;
|
||||
PushVelocity.Z = 50;
|
||||
Pawn( Other ).AddVelocity( PushVelocity );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// copied from Pawn.uc, but we don't want the ringmaster to freeze on match end
|
||||
function TurnOff()
|
||||
{
|
||||
//SetCollision(true,false);
|
||||
AmbientSound = None;
|
||||
bNoWeaponFiring = true;
|
||||
//Velocity = vect(0,0,0);
|
||||
//SetPhysics(PHYS_None);
|
||||
//bPhysicsAnimUpdate = false;
|
||||
bIsIdle = true;
|
||||
bWaitForAnim = false;
|
||||
StopAnimating();
|
||||
//bIgnoreForces = true;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
//NotThreateningTo(0)= class 'ZombieFleshPound'
|
||||
//NotThreateningTo(1)= class 'ZombieScrake'
|
||||
BaseAIThreatRating = 0.01f
|
||||
MaxTimesHit=15
|
||||
|
||||
bShowHealthBar = true
|
||||
NPCHealth = 250
|
||||
StartingHealthPct = 0.5
|
||||
FriendlyFireDamageScale=0.f
|
||||
bDropInventoryOnDeath = false
|
||||
BleedOutInterval = 1
|
||||
|
||||
NPCName = "Ringmaster Lockhart"
|
||||
HealedEvent="RingMasterHealed"
|
||||
bStartActive = false
|
||||
AIScriptTag=RingMasterAI
|
||||
|
||||
|
||||
/* Animation */
|
||||
|
||||
bNoDefaultInventory = true
|
||||
bCanPickupInventory = false
|
||||
|
||||
//GroundSpeed = 110
|
||||
GroundSpeed=98
|
||||
Mesh = SkeletalMesh'KF_Ringmaster_Trip.Ringmaster'
|
||||
|
||||
CowerAnim = "Freaking_out"
|
||||
MovementAnims(0)="WalkF"
|
||||
MovementAnims(1)="WalkB"
|
||||
MovementAnims(2)="WalkL"
|
||||
MovementAnims(3)="WalkR"
|
||||
|
||||
HitAnims(0)="Freaking_out"
|
||||
HitAnims(1)="Freaking_out"
|
||||
HitAnims(2)="Freaking_out"
|
||||
HitAnims(3)="Freaking_out"
|
||||
|
||||
IdleSeatedAnim="Heal_Sitting"
|
||||
IdleChatAnim="Idle_Talk"
|
||||
IdleStandingInjuredAnim="Idle_VeryWounded"
|
||||
IdleStandingAnim="Idle_Talk"
|
||||
StandUpAnim="Heal_Getup"
|
||||
|
||||
MinTimeBetweenPainSounds=1
|
||||
MinTimeBetweenBleedSounds=5.0
|
||||
|
||||
bAlwaysRelevant=true
|
||||
|
||||
BleedingSounds(0)=Sound'SummerBoardwalkDialogue.DE_260_1'
|
||||
BleedingSounds(1)=Sound'SummerBoardwalkDialogue.DE_270_Grunt_02'
|
||||
BleedingSounds(2)=Sound'SummerBoardwalkDialogue.DE_270_Grunt_03'
|
||||
BleedingSounds(3)=Sound'SummerBoardwalkDialogue.DE_270_Knee_01'
|
||||
BleedingSounds(4)=Sound'SummerBoardwalkDialogue.DE_280_4'
|
||||
}
|
||||
14
kf_sources/SideshowScript/Classes/KF_RingMasterSoundGroup.uc
Normal file
14
kf_sources/SideshowScript/Classes/KF_RingMasterSoundGroup.uc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//-----------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------
|
||||
class KF_RingMasterSoundGroup extends KFMaleSoundGroup;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
PainSounds(0)=Sound'SummerBoardwalkDialogue.DE_260_3'
|
||||
PainSounds(1)=Sound'SummerBoardwalkDialogue.DE_260_4'
|
||||
PainSounds(2)=Sound'SummerBoardwalkDialogue.DE_260_5'
|
||||
PainSounds(3)=Sound'SummerBoardwalkDialogue.DE_260_Phrase_02'
|
||||
PainSounds(4)=Sound'SummerBoardwalkDialogue.DE_260_Phrase_03'
|
||||
PainSounds(5)=Sound'SummerBoardwalkDialogue.DE_260_Phrase_05'
|
||||
}
|
||||
42
kf_sources/SideshowScript/Classes/KF_RotatingMeshActor.uc
Normal file
42
kf_sources/SideshowScript/Classes/KF_RotatingMeshActor.uc
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
KF_RotatingMeshActor
|
||||
--------------------------------------------------------------
|
||||
|
||||
A simple actor used in the 2013 Summer SideShow map.
|
||||
|
||||
it spins around.
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class KF_RotatingMeshActor extends Actor
|
||||
placeable;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bEdShouldSnap=True
|
||||
bStaticLighting=True
|
||||
bShadowCast=True
|
||||
bCollideActors=True
|
||||
bBlockActors=False
|
||||
bBlockKarma=False
|
||||
CollisionHeight=+000001.000000
|
||||
CollisionRadius=+000001.000000
|
||||
bAcceptsProjectors=True
|
||||
bUseDynamicLights=true
|
||||
|
||||
bStatic = false
|
||||
bNoDelete = true
|
||||
|
||||
bFixedRotationDir = true
|
||||
Physics = PHYS_Rotating
|
||||
|
||||
DrawType = DT_StaticMesh
|
||||
StaticMesh = StaticMesh 'OfficeStatics.AirConditioner'
|
||||
RemoteRole = ROLE_None
|
||||
|
||||
RotationRate=(Pitch=0,Yaw=5000,Roll=)
|
||||
}
|
||||
52
kf_sources/SideshowScript/Classes/KF_SafeDoorTrigger.uc
Normal file
52
kf_sources/SideshowScript/Classes/KF_SafeDoorTrigger.uc
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
KF_SafeDoorTrigger
|
||||
--------------------------------------------------------------
|
||||
|
||||
Activates the doors to Lockheart's safe in the Summer Steamland map.
|
||||
|
||||
only allow players who can carry the Gold bar inside the safe to
|
||||
activate the door!
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
class KF_SafeDoorTrigger extends KFUseTrigger_Story;
|
||||
|
||||
/* True if the player successfully interacted with the safe */
|
||||
var bool bSafeDoorOpened;
|
||||
|
||||
function UsedBy(Pawn user)
|
||||
{
|
||||
if(AllowOpenSafe(user))
|
||||
{
|
||||
bSafeDoorOpened = true;
|
||||
Super.UsedBy(user);
|
||||
}
|
||||
else // can't pick it up.
|
||||
{
|
||||
if(!bSafeDoorOpened &&
|
||||
User != none &&
|
||||
PlayerController(User.Controller) != none)
|
||||
{
|
||||
PlayerController(User.Controller).ReceiveLocalizedMessage(class'Msg_GoldSafe');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bool AllowOpenSafe(Pawn User)
|
||||
{
|
||||
if ( User == None ||
|
||||
!User.bCanPickupInventory ||
|
||||
User.FindInventoryType(class 'Inv_GoldBar') != none )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
69
kf_sources/SideshowScript/Classes/Msg_GoldBarNotification.uc
Normal file
69
kf_sources/SideshowScript/Classes/Msg_GoldBarNotification.uc
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
Msg_GoldBarNotification
|
||||
--------------------------------------------------------------
|
||||
|
||||
Local Message class for Gold bar objective notifications.
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Msg_GoldBarNotification extends WaitingMessage;
|
||||
|
||||
var localized string GoldWasPickedUpString;
|
||||
var localized string GoldWasDroppedString;
|
||||
var localized string GoldWasRecoveredString;
|
||||
|
||||
static function string GetString(
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
switch(Switch)
|
||||
{
|
||||
case 1 : // Someone picked up the gold.
|
||||
|
||||
return RelatedPRI_1.PlayerName@default.GoldWasPickedUpString ;
|
||||
|
||||
case 2 : // Someone dropped the gold.
|
||||
|
||||
return RelatedPRI_1.PlayerName@default.GoldWasDroppedString ;
|
||||
|
||||
case 3 : // Someone Recovered the gold.
|
||||
|
||||
return RelatedPRI_1.PlayerName@default.GoldWasRecoveredString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static function GetPos(int Switch, out EDrawPivot OutDrawPivot, out EStackMode OutStackMode, out float OutPosX, out float OutPosY)
|
||||
{
|
||||
OutDrawPivot = default.DrawPivot;
|
||||
OutStackMode = default.StackMode;
|
||||
OutPosX = default.PosX;
|
||||
OutPosY = 0.7;
|
||||
}
|
||||
|
||||
static function float GetLifeTime(int Switch)
|
||||
{
|
||||
return default.LifeTime;
|
||||
}
|
||||
|
||||
static function int GetFontSize(int Switch, PlayerReplicationInfo RelatedPRI1, PlayerReplicationInfo RelatedPRI2, PlayerReplicationInfo LocalPlayer)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Lifetime=4
|
||||
DrawColor=(R=255,G=240,B=75)
|
||||
|
||||
GoldWasPickedUpString = "picked up a piece of gold"
|
||||
GoldWasDroppedString = "dropped a piece of gold"
|
||||
GoldWasRecoveredString = "secured a piece of gold"
|
||||
}
|
||||
36
kf_sources/SideshowScript/Classes/Msg_GoldSafe.uc
Normal file
36
kf_sources/SideshowScript/Classes/Msg_GoldSafe.uc
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
class Msg_GoldSafe extends WaitingMessage;
|
||||
|
||||
var localized string YouCantOpenSafe;
|
||||
|
||||
static function string GetString(
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
return default.YouCantOpenSafe;
|
||||
}
|
||||
|
||||
static function GetPos(int Switch, out EDrawPivot OutDrawPivot, out EStackMode OutStackMode, out float OutPosX, out float OutPosY)
|
||||
{
|
||||
OutDrawPivot = default.DrawPivot;
|
||||
OutStackMode = default.StackMode;
|
||||
OutPosX = default.PosX;
|
||||
OutPosY = 0.7;
|
||||
}
|
||||
|
||||
static function float GetLifeTime(int Switch)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
static function int GetFontSize(int Switch, PlayerReplicationInfo RelatedPRI1, PlayerReplicationInfo RelatedPRI2, PlayerReplicationInfo LocalPlayer)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
YouCantOpenSafe = "Cannot open safe. You are already carrying gold."
|
||||
}
|
||||
98
kf_sources/SideshowScript/Classes/Pickup_GoldBar.uc
Normal file
98
kf_sources/SideshowScript/Classes/Pickup_GoldBar.uc
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
--------------------------------------------------------------
|
||||
Pickup_GoldBar
|
||||
--------------------------------------------------------------
|
||||
|
||||
Pickup Class for the gold bar inventory item in the summer
|
||||
sideshow map.
|
||||
|
||||
Author : Alex Quick
|
||||
|
||||
--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Pickup_GoldBar extends KF_StoryInventoryPickup;
|
||||
|
||||
auto state Pickup
|
||||
{
|
||||
/* ValidTouch()
|
||||
Validate touch (if valid return true to let other pick me up and trigger event).
|
||||
*/
|
||||
function bool ValidTouch( actor Other )
|
||||
{
|
||||
if(IsTouchingDropVolume())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return Super.ValidTouch(Other);
|
||||
}
|
||||
}
|
||||
|
||||
function bool IsTouchingDropVolume()
|
||||
{
|
||||
local Volume V;
|
||||
|
||||
/* Haxxor to the Maxxor */
|
||||
Foreach TouchingActors(class 'Volume', V)
|
||||
{
|
||||
if(V.IsA('KF_DropInventoryVolume'))
|
||||
{
|
||||
return true; // no picking me back up if I'm placed in this volume!
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
state FallingPickup
|
||||
{
|
||||
event Landed(Vector HitNormal)
|
||||
{
|
||||
Super.Landed(HitNormal);
|
||||
|
||||
if(IsTouchingDropVolume())
|
||||
{
|
||||
BroadCastPickupEvent(Instigator,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function InitDroppedPickupFor(Inventory Inv)
|
||||
{
|
||||
Super.InitDroppedPickupFor(Inv);
|
||||
bAlwaysRelevant = true;
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
bRender1PMesh = false
|
||||
|
||||
CollisionRadius = 40
|
||||
CollisionHeight = 10
|
||||
|
||||
PrePivot=(X=0,Y=0,Z=10)
|
||||
|
||||
bOrientOnSlope=false
|
||||
|
||||
LightType=LT_Steady
|
||||
LightBrightness=200.000000
|
||||
LightRadius=3.000000
|
||||
LightHue=45
|
||||
LightSaturation=150
|
||||
bDynamicLight=False
|
||||
bUseDynamicLights =true
|
||||
|
||||
StaticMesh = StaticMesh'Pier_SM.Env_Pier_Gold_Bars'
|
||||
|
||||
AIThreatModifier = 1.5
|
||||
|
||||
/* players must carry one crate at a time */
|
||||
MaxHeldCopies = 1
|
||||
|
||||
CarriedMaterial = Texture 'Pier_T.Icons.Goldbar_Icon_64'
|
||||
GroundMaterial = Texture 'Pier_T.Icons.Goldbar_Icon_64'
|
||||
InventoryType = class 'Inv_GoldBar'
|
||||
MessageClass = class 'Msg_GoldBarNotification'
|
||||
}
|
||||
19
kf_sources/SideshowScript/Classes/index.html
Normal file
19
kf_sources/SideshowScript/Classes/index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/SideshowScript/Classes/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/SideshowScript/Classes/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="Deco_AirShip.uc">Deco_AirShip.uc</a> 06-Oct-2019 10:27 3017
|
||||
<a href="Deco_FerrisWheel.uc">Deco_FerrisWheel.uc</a> 06-Oct-2019 10:27 350
|
||||
<a href="Deco_SkyboxAirShips.uc">Deco_SkyboxAirShips.uc</a> 06-Oct-2019 10:27 346
|
||||
<a href="Emitter_OilFountain.uc">Emitter_OilFountain.uc</a> 06-Oct-2019 10:27 2000
|
||||
<a href="Inv_GoldBar.uc">Inv_GoldBar.uc</a> 06-Oct-2019 10:27 831
|
||||
<a href="KF_DropInventoryVolume.uc">KF_DropInventoryVolume.uc</a> 06-Oct-2019 10:27 2599
|
||||
<a href="KF_RingMasterNPC.uc">KF_RingMasterNPC.uc</a> 06-Oct-2019 10:27 11034
|
||||
<a href="KF_RingMasterSoundGroup.uc">KF_RingMasterSoundGroup.uc</a> 06-Oct-2019 10:27 592
|
||||
<a href="KF_RotatingMeshActor.uc">KF_RotatingMeshActor.uc</a> 06-Oct-2019 10:27 940
|
||||
<a href="KF_SafeDoorTrigger.uc">KF_SafeDoorTrigger.uc</a> 06-Oct-2019 10:27 1187
|
||||
<a href="Msg_GoldBarNotification.uc">Msg_GoldBarNotification.uc</a> 06-Oct-2019 10:27 1876
|
||||
<a href="Msg_GoldSafe.uc">Msg_GoldSafe.uc</a> 06-Oct-2019 10:27 919
|
||||
<a href="Pickup_GoldBar.uc">Pickup_GoldBar.uc</a> 06-Oct-2019 10:27 2113
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
7
kf_sources/SideshowScript/index.html
Normal file
7
kf_sources/SideshowScript/index.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/SideshowScript/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/SideshowScript/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="Classes/">Classes/</a> 29-Jun-2025 19:43 -
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue