Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added More Weapon Settings #25

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Classes/ST_BioGlob.uc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ state OnSurface
return;
GotoState('Exploding');
}

function BeginState()
{
wallTime = 3.8;

MyFear = Spawn(class'BioFear');
if ( Mover(Base) != None )
{
BaseOffset = VSize(Location - Base.Location);
SetTimer(0.2, true);
}
else
SetTimer(wallTime, false);
}
}

defaultproperties
Expand Down
18 changes: 18 additions & 0 deletions Classes/ST_BioSplash.uc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ auto state Flying
}
}

state OnSurface
{
function BeginState()
{
wallTime = 3.8;

MyFear = Spawn(class'BioFear');
if ( Mover(Base) != None )
{
BaseOffset = VSize(Location - Base.Location);
SetTimer(0.2, true);
}
else
SetTimer(wallTime, false);
}

}

defaultproperties
{
speed=300.000000
Expand Down
39 changes: 39 additions & 0 deletions Classes/ST_PlasmaSphere.uc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,48 @@ simulated function PostBeginPlay()
ForEach AllActors(Class'ST_Mutator', STM)
break;
}
Speed = STM.WeaponSettings.PulseSphereSpeed;
DrawScale=0.120000;
Super.PostBeginPlay();
}

simulated function Explode(vector HitLocation, vector HitNormal)
{
if ( !bExplosionEffect )
{
if ( Role == ROLE_Authority )
BlowUp(HitLocation);
bExplosionEffect = true;
if ( !Level.bHighDetailMode || bHitPawn || Level.bDropDetail )
{
if ( bExploded )
{
Destroy();
return;
}
else
DrawScale = 0.2;
}
else
DrawScale = 0.2;

LightType = LT_Steady;
LightRadius = 5;
SetCollision(false,false,false);
LifeSpan = 0.5;
Texture = ExpType;
DrawType = DT_SpriteAnimOnce;
Style = STY_Translucent;
if ( Region.Zone.bMoveProjectiles && (Region.Zone.ZoneVelocity != vect(0,0,0)) )
{
bBounce = true;
Velocity = Region.Zone.ZoneVelocity;
}
else
SetPhysics(PHYS_None);
}
}

simulated function ProcessTouch (Actor Other, vector HitLocation)
{
If ( Other!=Instigator && PlasmaSphere(Other)==None )
Expand Down
104 changes: 104 additions & 0 deletions Classes/ST_PulseGun.uc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ var ST_Mutator STM;

var WeaponSettingsRepl WSettings;

// For the PulseSphereFireRate setting
var float RateOfFire;

simulated final function WeaponSettingsRepl FindWeaponSettings() {
local WeaponSettingsRepl S;

Expand All @@ -33,6 +36,8 @@ function PostBeginPlay()

ForEach AllActors(Class'ST_Mutator', STM)
break; // Find master :D

RateOfFire = STM.WeaponSettings.PulseSphereFireRate;
}

function SetSwitchPriority(pawn Other)
Expand Down Expand Up @@ -67,6 +72,105 @@ function SetSwitchPriority(pawn Other)
}
}

state NormalFire
{
ignores AnimEnd;

function Projectile ProjectileFire(class<projectile> ProjClass, float ProjSpeed, bool bWarn)
{
local Vector Start, X,Y,Z;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation,X,Y,Z);
Start = Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = pawn(owner).AdjustAim(ProjSpeed, Start, AimError, True, bWarn);
Start = Start - Sin(Angle)*Y*4 + (Cos(Angle)*4 - 10.78)*Z;
if (!Owner.FastTrace(Start))
Start = Owner.Location + Normal(Start - Owner.Location) * Owner.CollisionRadius*0.9;
Angle += 1.8;
return Spawn(ProjClass,,, Start,AdjustedAim);
}

function Tick( float DeltaTime )
{
if ( Owner==None )
GotoState('Pickup');
}

function BeginState()
{
Super.BeginState();
Angle = 0;
AmbientGlow = 200;
}

function EndState()
{
PlaySpinDown();
AmbientSound = None;
AmbientGlow = 0;
OldFlashCount = FlashCount;
Super.EndState();
}

Begin:
Sleep(RateOfFire); // Added rate of fire setting
Finish();
}

simulated state ClientFiring
{
simulated event BeginState()
{
Super.BeginState();
AmbientGlow = 200;
}

simulated event EndState()
{
Super.EndState();
AmbientSound = None;
AmbientGlow = 0;
}

simulated event Tick( float DeltaTime )
{
if ( (Pawn(Owner) != None) && (Pawn(Owner).bFire != 0) )
AmbientSound = FireSound;
else
AmbientSound = None;
}

simulated event AnimEnd()
{
if ( (AmmoType != None) && (AmmoType.AmmoAmount <= 0) )
{
PlaySpinDown();
GotoState('');
}
else if ( !bCanClientFire )
GotoState('');
else if ( Pawn(Owner) == None )
{
PlaySpinDown();
GotoState('');
}
else if ( Pawn(Owner).bFire != 0 )
Global.ClientFire(0);
else if ( Pawn(Owner).bAltFire != 0 )
Global.ClientAltFire(0);
else
{
PlaySpinDown();
GotoState('');
}
}
Begin:
Sleep(RateOfFire); // Added rate of fire setting
if ( (Pawn(Owner) != None) && (Pawn(Owner).bFire != 0) )
Goto('Begin');
AnimEnd();
}

simulated function PlaySelect() {
bForceFire = false;
bForceAltFire = false;
Expand Down
24 changes: 23 additions & 1 deletion Classes/ST_ShockProj.uc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ var ST_Mutator STM;
// For Standstill combo Special
var vector StartLocation;

// For ShockProjectileTakeDamage
var float Health;

simulated function PostBeginPlay()
{
if (ROLE == ROLE_Authority)
Expand All @@ -19,7 +22,10 @@ simulated function PostBeginPlay()
ForEach AllActors(Class'ST_Mutator', STM)
break; // Find master :D
}

if (STM.WeaponSettings.ShockProjectileTakeDamage == True)
{
Health = STM.WeaponSettings.ShockProjectileHealth;
}
Super.PostBeginPlay();
}

Expand Down Expand Up @@ -75,5 +81,21 @@ function Explode(vector HitLocation,vector HitNormal)
Destroy();
}

function TakeDamage( int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType)
{
if (STM.WeaponSettings.ShockProjectileTakeDamage == True)
{
if (DamageType == 'Pulsed'|| DamageType == 'Corroded')
{
Health -= Damage;
if (Health <= 0)
{
Spawn(class'ut_RingExplosion',,, Location + Momentum * 0.1, rotator(Momentum));
Destroy();
}
}
}
}

defaultproperties {
}
54 changes: 54 additions & 0 deletions Classes/ST_UT_BioGel.uc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,60 @@ function Timer()
Destroy();
}

state OnSurface
{
function ProcessTouch (Actor Other, vector HitLocation)
{
GotoState('Exploding');
}


function Timer()
{
if ( Mover(Base) != None )
{
WallTime -= 0.2;
if ( WallTime < 0.15 )
Global.Timer();
else if ( VSize(Location - Base.Location) > BaseOffset + 4 )
Global.Timer();
}
else
Global.Timer();
}

function BeginState()
{
wallTime = 3.8;

MyFear = Spawn(class'BioFear');
if ( Mover(Base) != None )
{
BaseOffset = VSize(Location - Base.Location);
SetTimer(0.2, true);
}
else
{
if (STM.WeaponSettings.BioPrimaryInstantExplosion)
Timer();
else
SetTimer(wallTime, false);
}
}

}

state Exploding
{
ignores Touch, TakeDamage;

function BeginState()
{
SetTimer(0.2, False); // Make explosions after touch not random
}
}


auto state Flying
{
function ProcessTouch (Actor Other, vector HitLocation)
Expand Down
10 changes: 10 additions & 0 deletions Classes/WeaponSettings.uc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ var config float PulseSelectTime;
var config float PulseDownTime;
var config float PulseSphereDamage;
var config float PulseSphereMomentum;
var config float PulseSphereSpeed;
var config float PulseSphereFireRate;
var config float PulseBoltDPS;
var config float PulseBoltMomentum;
var config float PulseBoltMaxAccumulate;
Expand All @@ -96,6 +98,8 @@ var config float ShockProjectileDamage;
var config float ShockProjectileHurtRadius;
var config float ShockProjectileMomentum;
var config bool ShockProjectileBlockBullets;
var config bool ShockProjectileTakeDamage;
var config float ShockProjectileHealth;
var config float ShockComboDamage;
var config float ShockComboMomentum;
var config float ShockComboHurtRadius;
Expand All @@ -104,6 +108,7 @@ var config float BioSelectTime;
var config float BioDownTime;
var config float BioDamage;
var config float BioMomentum;
var config bool BioPrimaryInstantExplosion;
var config float BioAltDamage;
var config float BioAltMomentum;
var config float BioHurtRadiusBase;
Expand Down Expand Up @@ -226,6 +231,8 @@ defaultproperties
PulseDownTime=0.26
PulseSphereDamage=20
PulseSphereMomentum=1.0
PulseSphereSpeed=1450.000000
PulseSphereFireRate=0.18
PulseBoltDPS=72
PulseBoltMomentum=1.0
PulseBoltMaxAccumulate=0.08
Expand All @@ -240,6 +247,8 @@ defaultproperties
ShockProjectileHurtRadius=70
ShockProjectileMomentum=1.0
ShockProjectileBlockBullets=True
ShockProjectileTakeDamage=False
ShockProjectileHealth=30
ShockComboDamage=165
ShockComboHurtRadius=250
ShockComboMomentum=1.0
Expand All @@ -248,6 +257,7 @@ defaultproperties
BioDownTime=0.333333
BioDamage=20
BioMomentum=1.0
BioPrimaryInstantExplosion=False
BioAltDamage=75
BioAltMomentum=1.0
BioHurtRadiusBase=75
Expand Down
Loading