PDA

View Full Version : Rockets shooting out of Flak Cannon


187umKilla
27th Feb 2002, 06:23 PM
How would I manage to do this ....


Shoot a rocket out of my Flak Cannon.

Alright, Now I am a newbie to Uscript but I know basic things.

I exported all my .uc files and they're currently in folders. I made my own package called MyMod and its in EditPackages in UT.INI.

I know how to make it a Mutator but,

lets say I got in the flak Cannon properties .uc file
------------------------------------------------------------------------------------
// UT_FlakCannon.
// ==================================================
===========================

ProjectileClass=Class'Botpack.UTChunk'
AltProjectileClass=Class'Botpack.flakslug'

------------------------------------------------------------------------------------
// UT_Eightball.
// ==================================================
===========================

ProjectileClass=Class'Botpack.RocketMk2'
AltProjectileClass=Class'Botpack.UT_Grenade'

Alright, Now, lets say I copy UT_FlakCannon.uc into my C:\UnrealTournament\MyMod\

and edit it so it says this ( what I want to do is make it so when I hit right click it actually shoot the secondary rocket )


ProjectileClass=Class'Botpack.UTChunk'
AltProjectileClass=Class'Botpack.UT_Grenade'

Then, shouldn't I be able to recompile and when I secondary fire it shoots out a Eightballs secondary fire..
Well I thought it would be that easy....but its really not.

Maybe you could help me out.. I found a tutorial to make a FlakCannon change to a 'MultiCannon' or something but it wasnt working, but what it was saying is that you have to change these properties....
==============================================
function AltFire( float Value )
{
local Vector Start, X,Y,Z;

if ( AmmoType == None )
{
// ammocheck
GiveAmmo(Pawn(Owner));
}
if (AmmoType.UseAmmo(1))
{
Pawn(Owner).PlayRecoil(FiringSpeed);
bPointing=True;
bCanClientFire = true;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation,X,Y,Z);
Start = Owner.Location + CalcDrawOffset();
Spawn(class'WeaponLight',,'',Start+X*20,rot(0,0,
0));
Start = Start + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = pawn(owner).AdjustToss(AltProjectileSpeed, Start, AimError, True, bAltWarnTarget);
Spawn(class'FlakSlug',,, Start,AdjustedAim);
ClientAltFire(Value);
GoToState('AltFiring');
}
}
==============================================

Smoke39
27th Feb 2002, 07:21 PM
Make
Spawn(class'FlakSlug',,, Start,AdjustedAim);

Be
Spawn(class'RocketMk2',,, Start,AdjustedAim);

187umKilla
27th Feb 2002, 08:03 PM
thanks that was quick