ME <-- Newb to UnrealScript.
I have got ConTEXT, UnrealEd, & UCC MAKE, and I did the 3D Buzz Unreal Script VTM, now working on modding.
ITT I will be discussing my UT_Eightball modding problem from UT99 (original UT is, imho, the only good UT)
I want a rocket launcher that shoots really fast rockets.
class RocketMaul extends UT_Eightball;
class RocketMaulMk2 extends RocketMk2;
RocketMaul overwrites the weapon name, ammo count, and pickup msg, as well as overwriting "state FireRockets{}".
"state FireRockets{}" is where RocketMaul calls the class RocketMaulMk2 (parallelling how UT_Eightball calls class RocketMk2)
RocketMaulMk2 overwrites the speed/MaxSpeed default properties making for fast rockets.
One problem I discover is that, despite my rockets being really fast, they're still slow when operating as seeker missiles. So my thought is to go ahead and make a third custom class overwriting parts of UT_SeekingRocket just like i made RocketMaulMk2 overwrite parts of RocketMk2. In this way, whether RocketMaul calls a regular or a seeker missile, the result can be fast missiles!
Here is a segment from RocketMaul:
The code works until I change
s = Spawn( class'UT_SeekingRocket',, '',
to
s = Spawn( class'rocketmaulseekingrocket',, '',
or
s = Spawn( class'Daffyduck',, '',
or
s = Spawn( class'RocketMaulSeekingRocket',, '',
the error does not seem to be related to any class other than rocketmaul and yes I have double and triple checked to isolate the problem it is DEF in rocketmaul. This is the error that will be haunting my dreams tonight:
C:\...\RocketMaul.uc(123)
: Error, Type mismatch in '='
Line 123 is:
FireRot.Yaw = AdjustedAim.Yaw;
It's weird that ucc says line 123 has a problem when line 123 worked before i changed the class call. I've done a lot of debugging. Spent several hours. Please (hoping somebody still plays UT99). Woo!
I have got ConTEXT, UnrealEd, & UCC MAKE, and I did the 3D Buzz Unreal Script VTM, now working on modding.
ITT I will be discussing my UT_Eightball modding problem from UT99 (original UT is, imho, the only good UT)
So let's get to it!
I want a rocket launcher that shoots really fast rockets.
so...
I have 2 new/custom "*.uc" files overwriting parts of the originals.class RocketMaul extends UT_Eightball;
class RocketMaulMk2 extends RocketMk2;
RocketMaul overwrites the weapon name, ammo count, and pickup msg, as well as overwriting "state FireRockets{}".
"state FireRockets{}" is where RocketMaul calls the class RocketMaulMk2 (parallelling how UT_Eightball calls class RocketMk2)
RocketMaulMk2 overwrites the speed/MaxSpeed default properties making for fast rockets.
at this point everything is cool. Fast rockets galore.
One problem I discover is that, despite my rockets being really fast, they're still slow when operating as seeker missiles. So my thought is to go ahead and make a third custom class overwriting parts of UT_SeekingRocket just like i made RocketMaulMk2 overwrite parts of RocketMk2. In this way, whether RocketMaul calls a regular or a seeker missile, the result can be fast missiles!
Here is a segment from RocketMaul:
Code:
//==================================
if ( Angle > 0 )
{
if ( Angle < 3 && !bTightWad)
FireRot.Yaw = AdjustedAim.Yaw - Angle * 600;
else if ( Angle > 3.5 && !bTightWad)
FireRot.Yaw = AdjustedAim.Yaw + (Angle - 3) * 600;
else
FireRot.Yaw = AdjustedAim.Yaw;
}
if ( LockedTarget != None )
{
s = Spawn( class'UT_SeekingRocket',, '', FireLocation,FireRot);
s.Seeking = LockedTarget;
s.NumExtraRockets = DupRockets;
if ( Angle > 0 )
s.Velocity *= (0.9 + 0.2 * FRand());
}
else
{
r = Spawn( class'rocketmaulmk2',, '', FireLocation,FireRot);
r.NumExtraRockets = DupRockets;
if (RocketsLoaded>4 && bTightWad) r.bRing=True;
if ( Angle > 0 )
r.Velocity *= (0.9 + 0.2 * FRand());
}
//==================================
The code works until I change
s = Spawn( class'UT_SeekingRocket',, '',
to
s = Spawn( class'rocketmaulseekingrocket',, '',
or
s = Spawn( class'Daffyduck',, '',
or
s = Spawn( class'RocketMaulSeekingRocket',, '',
the error does not seem to be related to any class other than rocketmaul and yes I have double and triple checked to isolate the problem it is DEF in rocketmaul. This is the error that will be haunting my dreams tonight:
C:\...\RocketMaul.uc(123)
: Error, Type mismatch in '='
Line 123 is:
FireRot.Yaw = AdjustedAim.Yaw;
It's weird that ucc says line 123 has a problem when line 123 worked before i changed the class call. I've done a lot of debugging. Spent several hours. Please (hoping somebody still plays UT99). Woo!
Last edited: