Little help from the community

Discussions about UT99
User avatar
NemesisNeS
Experienced
Posts: 130
Joined: Tue Nov 23, 2021 7:24 pm
Personal rank: GOD, not Godlike
Location: Under someones bed

Little help from the community

Post by NemesisNeS » Wed Dec 15, 2021 7:06 pm

So I am working on creating weapon mutators for UT GOTY Edition, all in code mind you, and I ran into a problem every time I try to create this one weapon using ucc make.
Spoiler
Show
// ================================================================================================
// * 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
}
Now my problem starts when I run ucc make and it tells me the following:

Code: Select all

...\PipebombCannon\Classes\PipebombCannon.uc(49) : Error, Redefinition of 'function ProjectileFire' differs from original
I have tried everything, even removing function ProjectileFire and I still get the same error. (I really am annoyed at making weapons). It built my Dispersion Gun and even Grenade Launcher and even built the bloody Pipebomb itself. But I think it doesn't like the cannon. Anyway any help in solving this would be appreciated, since I need a fresh pair of eyeballs to help me with this one. I figured I'd place the entire code here so this way you guys can have a crack at it. And yes I snagged this from OldUnreal. Great place to learn about making weapon mutators... or so I thought. Thanks in advance for any and all help that can come my way.
Feeling the urge to kill people who put up links with advertisements....
:instagib2:

User avatar
sektor2111
Godlike
Posts: 5880
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Little help from the community

Post by sektor2111 » Wed Dec 15, 2021 7:22 pm

Why not using ANOTHER name for said function instead of redefining whatever "FINAL" function or such which is NOT accepted for being redefined ?

User avatar
NemesisNeS
Experienced
Posts: 130
Joined: Tue Nov 23, 2021 7:24 pm
Personal rank: GOD, not Godlike
Location: Under someones bed

Re: Little help from the community

Post by NemesisNeS » Wed Dec 15, 2021 7:24 pm

Oh?!? Dang it, this is why I am glad I asked you guys here. Like I said I needed the extra pair of eyeballs :ironic: Thanks mate will try that.
Feeling the urge to kill people who put up links with advertisements....
:instagib2: