UE1 - UT Problem with "state FireRockets" @ UT99

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

warpdragon

New Member
Mar 11, 2011
5
0
0
USA
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)

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! :D
 
Last edited:

War_Master

Member
May 27, 2005
702
0
16
's' has to equal a specific class or a child of that class so you can call any new variables/functions from it.

If the classes you're spawning are not child of 's' you will get an error as well.
 

warpdragon

New Member
Mar 11, 2011
5
0
0
USA
fixed

yeah, i totally fixed it and it was totally obvious n junk. wow:

local RocketMaulSeekingRocket s;

that was what needed to be changed.

something about a child? yeah, that was probably it.

Thanks for fast response. Clearly I have much to learn.
 

gopostal

Active Member
Jan 19, 2006
848
47
28
Get used to it, that's development in a nutshell. If you need one-on-one help feel free to drop me a line.

You can also peruse the source code with my sig link.