Add stopping power mechanic
This commit is contained in:
parent
1bc35cc348
commit
0951574451
23 changed files with 208 additions and 196 deletions
|
|
@ -915,9 +915,16 @@ state Charging
|
|||
// How many charge attacks we can do randomly 1-3
|
||||
NumChargeAttacks = Rand(2) + 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 1.25;
|
||||
} else {
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bChargingPlayer = False;
|
||||
ChargeDamage = 0;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
|
|
@ -942,7 +949,6 @@ state Charging
|
|||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
if( LookTarget!=none )
|
||||
{
|
||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||
|
|
@ -956,16 +962,6 @@ state Charging
|
|||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
|
||||
// Zapping slows him down, but doesn't stop him
|
||||
if( bZapped )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
||||
}
|
||||
}
|
||||
|
||||
Global.Tick(Delta);
|
||||
|
|
@ -1071,7 +1067,6 @@ State Escaping extends Charging // Got hurt and running away...
|
|||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1081,23 +1076,20 @@ State Escaping extends Charging // Got hurt and running away...
|
|||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
|
||||
// Zapping slows him down, but doesn't stop him
|
||||
if( bZapped )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.5);
|
||||
}
|
||||
}
|
||||
|
||||
Global.Tick(Delta);
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 1.25;
|
||||
} else {
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bChargingPlayer = False;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ defaultproperties
|
|||
HealthMax=8000.000000
|
||||
Health=8000
|
||||
HeadScale=1.300000
|
||||
stoppingRecoveryRate=0.1
|
||||
maxStoppingEffect=0.2
|
||||
minStoppingThreshold=0.6
|
||||
MenuName="Nice Patriarch"
|
||||
MovementAnims(0)="WalkF"
|
||||
MovementAnims(1)="WalkF"
|
||||
|
|
|
|||
|
|
@ -182,18 +182,6 @@ function TakeDamageClient(int Damage, Pawn InstigatedBy, Vector HitLocation, Vec
|
|||
if (bDecapitated)
|
||||
Died(InstigatedBy.Controller, damageType, HitLocation);
|
||||
}
|
||||
function TakeFireDamage(int Damage, Pawn Instigator)
|
||||
{
|
||||
Super.TakeFireDamage(Damage, Instigator);
|
||||
// Adjust movement speed if not charging
|
||||
if (!bChargingPlayer)
|
||||
{
|
||||
if (bBurnified)
|
||||
GroundSpeed = GetOriginalGroundSpeed() * BurnGroundSpeedMul;
|
||||
else
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
}
|
||||
}
|
||||
function ClawDamageTarget()
|
||||
{
|
||||
local KFHumanPawn HumanTarget;
|
||||
|
|
@ -311,19 +299,16 @@ Ignores StartCharging;
|
|||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed = groundSpeed + ((groundSpeed * 0.75 / maxRageCounter * (rageCounter + 1) * rageSpeedTween));
|
||||
}
|
||||
function EndState()
|
||||
{
|
||||
bChargingPlayer = false;
|
||||
|
||||
NiceZombieBruteController(Controller).RageFrustrationTimer = 0;
|
||||
|
||||
if (Health > 0)
|
||||
{
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
if (bBurnified)
|
||||
GroundSpeed *= BurnGroundSpeedMul;
|
||||
}
|
||||
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
ClientChargingAnims();
|
||||
|
||||
|
|
@ -331,12 +316,8 @@ Ignores StartCharging;
|
|||
}
|
||||
function Tick(float Delta)
|
||||
{
|
||||
if (!bShotAnim)
|
||||
{
|
||||
if (!bShotAnim) {
|
||||
RageSpeedTween = FClamp(RageSpeedTween + (Delta * 0.75), 0, 1.0);
|
||||
GroundSpeed = OriginalGroundSpeed + ((OriginalGroundSpeed * 0.75 / MaxRageCounter * (RageCounter + 1) * RageSpeedTween));
|
||||
if (bBurnified)
|
||||
GroundSpeed *= BurnGroundSpeedMul;
|
||||
}
|
||||
|
||||
Global.Tick(Delta);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ var bool bServerBlock;
|
|||
var bool bClientBlock;
|
||||
var float BlockDmgMul; // Multiplier for damage taken from blocked shots
|
||||
var float BlockFireDmgMul;
|
||||
var float BurnGroundSpeedMul; // Multiplier for ground speed when burning
|
||||
replication
|
||||
{
|
||||
reliable if(Role == ROLE_Authority)
|
||||
|
|
@ -61,7 +60,6 @@ defaultproperties
|
|||
BlockAddScale=2.500000
|
||||
BlockDmgMul=0.100000
|
||||
BlockFireDmgMul=1.000000
|
||||
BurnGroundSpeedMul=0.700000
|
||||
StunThreshold=4.000000
|
||||
flameFuel=0.500000
|
||||
clientHeadshotScale=1.300000
|
||||
|
|
@ -110,6 +108,7 @@ defaultproperties
|
|||
Health=1000
|
||||
HeadHeight=2.500000
|
||||
HeadScale=1.300000
|
||||
minStoppingThreshold=0.1
|
||||
MenuName="Brute"
|
||||
MovementAnims(0)="BruteWalkC"
|
||||
MovementAnims(1)="BruteWalkC"
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
|
|
@ -252,21 +251,21 @@ Ignores StartChargingFP;
|
|||
if(fpController == none)
|
||||
fpController.RageFrustrationTimer = 0;
|
||||
|
||||
if( Health>0 && !bZapped )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
ClientChargingAnims();
|
||||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (!bShotAnim) {
|
||||
groundSpeed *= 2.3;
|
||||
}
|
||||
}
|
||||
function Tick( float Delta )
|
||||
{
|
||||
if( !bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);//2.0;
|
||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||
{
|
||||
GoToState('');
|
||||
|
|
@ -330,11 +329,16 @@ Ignores StartChargingFP;
|
|||
state ChargeToMarker extends RageCharging
|
||||
{
|
||||
Ignores StartChargingFP;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (!bShotAnim) {
|
||||
groundSpeed *= 2.3;
|
||||
}
|
||||
}
|
||||
function Tick( float Delta )
|
||||
{
|
||||
if( !bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 2.3);
|
||||
if( !bFrustrated && !bZedUnderControl && Level.TimeSeconds>RageEndTime )
|
||||
{
|
||||
GoToState('');
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ defaultproperties
|
|||
Health=1650
|
||||
HeadHeight=2.500000
|
||||
HeadScale=1.300000
|
||||
maxStoppingEffect=0.05
|
||||
minStoppingThreshold=0.68
|
||||
MenuName="Nice Flesh Pound"
|
||||
MovementAnims(0)="PoundWalk"
|
||||
MovementAnims(1)="WalkB"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
|
|
@ -73,13 +72,6 @@ function RangedAttack(Actor A){
|
|||
if(!bShotAnim && !bDecapitated && VSize(A.Location - Location) <= 700)
|
||||
GoToState('RunningState');
|
||||
}
|
||||
simulated function Tick(float DeltaTime){
|
||||
super.Tick(DeltaTime);
|
||||
if(IsInState('RunningState'))
|
||||
SetGroundSpeed(GetOriginalGroundSpeed() * 1.875);
|
||||
else
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
state RunningState{
|
||||
// Set the zed to the zapped behavior
|
||||
simulated function SetZappedBehavior(){
|
||||
|
|
@ -94,7 +86,6 @@ state RunningState{
|
|||
if(bZapped)
|
||||
GoToState('');
|
||||
else{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.875);
|
||||
bRunning = true;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
|
|
@ -103,7 +94,6 @@ state RunningState{
|
|||
}
|
||||
}
|
||||
function EndState(){
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bRunning = false;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
|
|
@ -112,6 +102,10 @@ state RunningState{
|
|||
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 1.875;
|
||||
}
|
||||
function RemoveHead(){
|
||||
GoToState('');
|
||||
Global.RemoveHead();
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ defaultproperties
|
|||
HeadHeight=1.000000
|
||||
HeadScale=1.350000
|
||||
AmbientSoundScaling=8.000000
|
||||
stoppingRecoveryRate=0.05
|
||||
MenuName="Nice Husk"
|
||||
MovementAnims(0)="WalkF"
|
||||
MovementAnims(1)="WalkB"
|
||||
|
|
|
|||
|
|
@ -105,15 +105,11 @@ State SawingLoop
|
|||
else GoToState('');
|
||||
}
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed()
|
||||
{
|
||||
local float result;
|
||||
result = OriginalGroundSpeed;
|
||||
if ( bWasRaged || bCharging )
|
||||
result *= 3.5;
|
||||
else if( bZedUnderControl )
|
||||
result *= 1.25;
|
||||
return result;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bWasRaged || bCharging) {
|
||||
groundSpeed *= 3.5;
|
||||
}
|
||||
}
|
||||
state RunningState
|
||||
{
|
||||
|
|
@ -124,7 +120,6 @@ state RunningState
|
|||
GoToState('');
|
||||
else {
|
||||
bCharging = true;
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
|
|
@ -133,8 +128,6 @@ state RunningState
|
|||
function EndState()
|
||||
{
|
||||
bCharging = False;
|
||||
if( !bZapped )
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
}
|
||||
|
|
@ -163,6 +156,8 @@ defaultproperties
|
|||
ChallengeSound(2)=None
|
||||
ChallengeSound(3)=None
|
||||
ScoringValue=300
|
||||
maxStoppingEffect=0.25
|
||||
minStoppingThreshold=0.25
|
||||
MenuName="Jason"
|
||||
AmbientSound=Sound'ScrnZedPack_S.Jason.Jason_Sound'
|
||||
Mesh=SkeletalMesh'ScrnZedPack_A.JasonMesh'
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ function SetMindControlled(bool bNewMindControlled)
|
|||
|
||||
if( bNewMindControlled != bZedUnderControl )
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 1.25);
|
||||
Health *= 1.25;
|
||||
HealthMax *= 1.25;
|
||||
}
|
||||
|
|
@ -185,8 +184,9 @@ state RunningState
|
|||
{
|
||||
return false;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed() {
|
||||
return 3.5 * OriginalGroundSpeed;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 3.5;
|
||||
}
|
||||
function BeginState(){
|
||||
local NiceHumanPawn rageTarget, rageCause;
|
||||
|
|
@ -214,7 +214,6 @@ state RunningState
|
|||
if(bZapped)
|
||||
GoToState('');
|
||||
else{
|
||||
SetGroundSpeed(OriginalGroundSpeed * 3.5);
|
||||
bCharging = true;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
|
|
@ -224,10 +223,6 @@ state RunningState
|
|||
}
|
||||
function EndState()
|
||||
{
|
||||
if( !bZapped )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
bCharging = False;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
|
|
@ -265,8 +260,9 @@ State SawingLoop
|
|||
{
|
||||
return false;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed() {
|
||||
return OriginalGroundSpeed * AttackChargeRate;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= attackChargeRate;
|
||||
}
|
||||
function bool CanGetOutOfWay()
|
||||
{
|
||||
|
|
@ -279,7 +275,6 @@ State SawingLoop
|
|||
// Randomly have the scrake charge during an attack so it will be less predictable
|
||||
if(Health/HealthMax < 0.5 || FRand() <= 0.95)
|
||||
{
|
||||
SetGroundSpeed(OriginalGroundSpeed * AttackChargeRate);
|
||||
bCharging = true;
|
||||
if( Level.NetMode!=NM_DedicatedServer )
|
||||
PostNetReceive();
|
||||
|
|
@ -327,8 +322,6 @@ State SawingLoop
|
|||
{
|
||||
AmbientSound=default.AmbientSound;
|
||||
MeleeDamage = Max( DifficultyDamageModifer() * default.MeleeDamage, 1 );
|
||||
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
bCharging = False;
|
||||
if(Level.NetMode != NM_DedicatedServer)
|
||||
PostNetReceive();
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ defaultproperties
|
|||
HealthMax=1000.000000
|
||||
Health=1000
|
||||
HeadHeight=2.200000
|
||||
maxStoppingEffect=0.15
|
||||
minStoppingThreshold=0.15
|
||||
MenuName="Nice Scrake"
|
||||
MovementAnims(0)="SawZombieWalk"
|
||||
MovementAnims(1)="SawZombieWalk"
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ state Running
|
|||
Global.Tick(Delta);
|
||||
if (RunUntilTime < Level.TimeSeconds)
|
||||
GotoState('');
|
||||
GroundSpeed = GetOriginalGroundSpeed();
|
||||
}
|
||||
function BeginState()
|
||||
{
|
||||
|
|
@ -190,13 +189,12 @@ state Running
|
|||
function EndState()
|
||||
{
|
||||
bRunning = false;
|
||||
GroundSpeed = global.GetOriginalGroundSpeed();
|
||||
RunCooldownEnd = Level.TimeSeconds + PeriodRunCoolBase + FRand() * PeriodRunCoolRan;
|
||||
MovementAnims[0] = WalkAnim;
|
||||
}
|
||||
function float GetOriginalGroundSpeed()
|
||||
{
|
||||
return global.GetOriginalGroundSpeed() * 2.5;
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
groundSpeed *= 2.5;
|
||||
}
|
||||
function bool CanSpeedAdjust()
|
||||
{
|
||||
|
|
@ -219,14 +217,6 @@ simulated function bool AnimNeedsWait(name TestAnim)
|
|||
}
|
||||
return ExpectingChannel == 0;
|
||||
}
|
||||
simulated function float GetOriginalGroundSpeed()
|
||||
{
|
||||
local float result;
|
||||
result = OriginalGroundSpeed;
|
||||
if( bZedUnderControl )
|
||||
result *= 1.25;
|
||||
return result;
|
||||
}
|
||||
simulated function HandleAnimation(float Delta)
|
||||
{
|
||||
// hehehe
|
||||
|
|
|
|||
|
|
@ -281,6 +281,12 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
|
|||
function RemoveHead(){
|
||||
Super.RemoveHead();
|
||||
}
|
||||
simulated function UpdateGroundSpeed() {
|
||||
super.UpdateGroundSpeed();
|
||||
if (bShotAnim) {
|
||||
groundSpeed *= 0.65;
|
||||
}
|
||||
}
|
||||
simulated function Tick( float Delta )
|
||||
{
|
||||
local float currScreamTime;
|
||||
|
|
@ -295,17 +301,11 @@ simulated function Tick( float Delta )
|
|||
{
|
||||
if( bShotAnim )
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed() * 0.65);
|
||||
|
||||
if( LookTarget!=none )
|
||||
{
|
||||
Acceleration = AccelRate * Normal(LookTarget.Location - Location);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGroundSpeed(GetOriginalGroundSpeed());
|
||||
}
|
||||
}
|
||||
if(Role == ROLE_Authority && screamStartTime > 0){
|
||||
currScreamTime = Level.TimeSeconds - screamStartTime;
|
||||
|
|
|
|||
|
|
@ -709,7 +709,6 @@ defaultproperties
|
|||
HealEnergyDrain=0.200000
|
||||
ProjectileFireInterval=5.000000
|
||||
BurnDamageScale=1.000000
|
||||
mind=0.000000
|
||||
bFireImmune=False
|
||||
MoanVoice=SoundGroup'KF_EnemiesFinalSnd_CIRCUS.Husk.Husk_Talk'
|
||||
BleedOutDuration=5.000000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue