Spoiler
// ================================================================================================
// * File Name: PipebombCannon
// * Created By: NemesisNeS
// * Time Stamp: 12/14/2021 6:48:39 PM
// * Edit Time Stamp: 12/15/2021 12:04:02 PM
// * UDK Path: C:\UDK\UDK-2015-01
// * Unreal X-Editor v3.1.5.0
// * © Copyright 2012 - 2021. All Rights Reserved.
// ================================================================================================
class PipebombCannon expands TournamentWeapon;
var bool bAlreadyFiring;
// Don't really need this but I'm a lefty so it's nice to see a left handed model
function setHand(float Hand)
{
Super.SetHand(Hand);
if ( Hand == 1 )
Mesh = mesh(DynamicLoadObject("Botpack.PulseGunL", class'Mesh'));
else
Mesh = mesh'PulseGunR';
}
// Could use rateself but the bots didn't use the gun right
function PlayFiring() // Plays the firing animation
{
Owner.PlaySound(FireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
PlayAnim( 'Boltend', 0.3 );
bWarnTarget = (FRand() < 0.2);
}
function AltFire( float Value ) // This is the main core of the gun
{
local Vector Start, X,Y,Z;
local Pipebomb PB;
ForEach AllActors(class'PipeBomb', PB) // Calls all pipebomb actors
{
// Used settimer() because Explosion() blows player up
PB.Settimer(0.000001, false);
}
// Necessary otherwise the gun gets jammed
GoToState('AltFiring2');
}
//////////////////////////////////////////////////
// Normal projectile stuff
state NormalFire
{
function Projectile ProjectileFire(class ProjClass, float ProjSpeed, bool bWarn)
{
local Projectile D;
local int i;
local vector Start,X,Y,Z;
local Rotator StartRot, AltRotation;
D = Global.ProjectileFire(ProjClass, ProjSpeed, bWarn);
StartRot = D.Rotation;
Start = D.Location;
// Try changing 4 to 15 for ultimate carnage
for (i = 0; i<4; i++)
{
if (AmmoType.UseAmmo(1))
{
AltRotation = StartRot;
AltRotation.Pitch = FRand()*3000-1500;
AltRotation.Yaw = FRand()*3000-1500;
AltRotation.Roll = FRand()*9000-4500;
D = Spawn(ProjectileClass,,, Start - 2 * VRand(), AltRotation);
}
}
}
}
Begin:
FinishAnim();
PlayAnim('Still');
Sleep(0.4);
// Turns the pulsegun barrel at the end of firing
PlayPostSelect();
Finish()
}
///////////////////////////////////////////////////
// This just makes sure that the gun doesn't jam up
state AltFiring2
{
function EndState()
{
Finish();
}
function AnimEnd()
{
Finish();
}
Begin:
GotoState('Idle');
}
///////////////////////////////////////////////////
function PlayIdleAnim()
{
PlayAnim('Still');
}
defaultproperties
{
AmmoName=Class'Botpack.PAmmo'
PickupAmmoCount=40
bAltWarnTarget=True
FireOffset=(X=15.000000,Y=-15.000000,Z=2.000000)
ProjectileClass=Class'Pipebomb'
AltProjectileClass=Class'Botpack.Plasmasphere'br> shakemag=120.000000
AIRating=0.400000
RefireRate=0.800000
FireSound=Sound'UnrealShare.ASMD.TazerFire'
SelectSound=Sound'Botpack.PulseGun.PulsePickup'
Misc1Sound=Sound'UnrealShare.Stinger.EndFire'
DeathMessage="%o was boomed by %k's %w"
AutoSwitchPriority=6
InventoryGroup=6
PickupMessage="You picked up the Pipebomb cannon"
ItemName="Pipebomb cannon"
PlayerViewOffset=(X=1.700000,Z=-2.000000)
PlayerViewMesh=LodMesh'Botpack.PulseGunR'
PickupViewMesh=LodMesh'Botpack.PulsePickup'
ThirdPersonMesh=LodMesh'Botpack.PulseGun3rd'
ThirdPersonScale=0.400000
PickupSound=Sound'UnrealShare.Pickups.WeaponPickup'
Mesh=LodMesh'Botpack.PulsePickup'
bNoSmooth=False
SoundRadius=64
SoundVolume=255
CollisionRadius=27.000000
CollisionHeight=8.000000
}
// * File Name: PipebombCannon
// * Created By: NemesisNeS
// * Time Stamp: 12/14/2021 6:48:39 PM
// * Edit Time Stamp: 12/15/2021 12:04:02 PM
// * UDK Path: C:\UDK\UDK-2015-01
// * Unreal X-Editor v3.1.5.0
// * © Copyright 2012 - 2021. All Rights Reserved.
// ================================================================================================
class PipebombCannon expands TournamentWeapon;
var bool bAlreadyFiring;
// Don't really need this but I'm a lefty so it's nice to see a left handed model
function setHand(float Hand)
{
Super.SetHand(Hand);
if ( Hand == 1 )
Mesh = mesh(DynamicLoadObject("Botpack.PulseGunL", class'Mesh'));
else
Mesh = mesh'PulseGunR';
}
// Could use rateself but the bots didn't use the gun right
function PlayFiring() // Plays the firing animation
{
Owner.PlaySound(FireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
PlayAnim( 'Boltend', 0.3 );
bWarnTarget = (FRand() < 0.2);
}
function AltFire( float Value ) // This is the main core of the gun
{
local Vector Start, X,Y,Z;
local Pipebomb PB;
ForEach AllActors(class'PipeBomb', PB) // Calls all pipebomb actors
{
// Used settimer() because Explosion() blows player up
PB.Settimer(0.000001, false);
}
// Necessary otherwise the gun gets jammed
GoToState('AltFiring2');
}
//////////////////////////////////////////////////
// Normal projectile stuff
state NormalFire
{
function Projectile ProjectileFire(class ProjClass, float ProjSpeed, bool bWarn)
{
local Projectile D;
local int i;
local vector Start,X,Y,Z;
local Rotator StartRot, AltRotation;
D = Global.ProjectileFire(ProjClass, ProjSpeed, bWarn);
StartRot = D.Rotation;
Start = D.Location;
// Try changing 4 to 15 for ultimate carnage
for (i = 0; i<4; i++)
{
if (AmmoType.UseAmmo(1))
{
AltRotation = StartRot;
AltRotation.Pitch = FRand()*3000-1500;
AltRotation.Yaw = FRand()*3000-1500;
AltRotation.Roll = FRand()*9000-4500;
D = Spawn(ProjectileClass,,, Start - 2 * VRand(), AltRotation);
}
}
}
}
Begin:
FinishAnim();
PlayAnim('Still');
Sleep(0.4);
// Turns the pulsegun barrel at the end of firing
PlayPostSelect();
Finish()
}
///////////////////////////////////////////////////
// This just makes sure that the gun doesn't jam up
state AltFiring2
{
function EndState()
{
Finish();
}
function AnimEnd()
{
Finish();
}
Begin:
GotoState('Idle');
}
///////////////////////////////////////////////////
function PlayIdleAnim()
{
PlayAnim('Still');
}
defaultproperties
{
AmmoName=Class'Botpack.PAmmo'
PickupAmmoCount=40
bAltWarnTarget=True
FireOffset=(X=15.000000,Y=-15.000000,Z=2.000000)
ProjectileClass=Class'Pipebomb'
AltProjectileClass=Class'Botpack.Plasmasphere'br> shakemag=120.000000
AIRating=0.400000
RefireRate=0.800000
FireSound=Sound'UnrealShare.ASMD.TazerFire'
SelectSound=Sound'Botpack.PulseGun.PulsePickup'
Misc1Sound=Sound'UnrealShare.Stinger.EndFire'
DeathMessage="%o was boomed by %k's %w"
AutoSwitchPriority=6
InventoryGroup=6
PickupMessage="You picked up the Pipebomb cannon"
ItemName="Pipebomb cannon"
PlayerViewOffset=(X=1.700000,Z=-2.000000)
PlayerViewMesh=LodMesh'Botpack.PulseGunR'
PickupViewMesh=LodMesh'Botpack.PulsePickup'
ThirdPersonMesh=LodMesh'Botpack.PulseGun3rd'
ThirdPersonScale=0.400000
PickupSound=Sound'UnrealShare.Pickups.WeaponPickup'
Mesh=LodMesh'Botpack.PulsePickup'
bNoSmooth=False
SoundRadius=64
SoundVolume=255
CollisionRadius=27.000000
CollisionHeight=8.000000
}
Code: Select all
...\PipebombCannon\Classes\PipebombCannon.uc(49) : Error, Redefinition of 'function ProjectileFire' differs from original