[UT99] Player physics modification

  • 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.

DescX

New Member
May 20, 2004
3
0
0
Hey hey! I've got some issues with UnrealScript that I'm hoping the experts here can help me with ;).

Two quick notes: I've only spent a couple of hours looking over the UT source, but that I feel I have a firm grasp on the language itself. I'm fluent in Perl, C/C++, and well versed in Java, VB, and other languages... So I'm pretty programmatically competent :). Also, sorry for the post length in advance. I figure I'd rather come off as a windbag than a newbie, so hopefully that's ok on these forums :).

After doing some searching on these forums and others (admittedly, not tonnes.. but a good solid hour's worth), I haven't come across anything that would help me with my current dilemma. I want to modify player physics - specifically, to incorporate physics tricks from other games (such as QuakeWorld air control, and UT200X air jumps) into good old UT99. The physics changes will be part of a larger Game Type mod eventually, so I'm not looking for a Mutator-based solution.

My biggest problem is that the OO design of UT is incredibly daunting, and I have no clue what classes to extend in order to start work on the physics. To give you an idea of how lost I am, I tried creating a new class (MyPawn) that extended PlayerPawn. Just for kicks, I overrode the DoJump() function to multiply the JumpZ value by 2. I compiled, selected a custom game type which I got to work successfully (a DeathMatchPlus extension (MyGame) that gives you a Sock Rifle on spawn...), and got nothing (obviously? :)).

So, it seems to me that MyGame needs to be told to use MyPawn, rather than whatever PlayerPawn it currently (I assume) uses. Am I correct in saying that? If so, how would I go about that? If I'm way off base (probably very likely), then hopefully I've given enough info for someone out there with a kind heart to set me on track ;).

...And if I've been too vague, slap me around and ask for clarification :).
 

DescX

New Member
May 20, 2004
3
0
0
G'day :) Thanks for the reply sir.

I've done a good amount of browsing in the Wiki and couldn't find any examples for stuff close to what I'm looking at doing here.

I'm definately going to pour most all of my learning time into the Wiki pages once I get going, but I'm the type of guy that learns much more by example than by theory. Unfortunately, as are all Wikis, it's pretty much a jumble of theory... a massive reference for people who already know what they're doing :).

Is there perhaps a Mutator or something else that works with physics that you could point me to? I'd really like to take a look at some examples that have something (even if very distant) in common with physics modification. I come from the Quake community, and pretty much never exposed myself to the Unreal series until 2004... so if me asking about where to find some Mutators/example mods sounds lame, it's because I'm brand new to this side of the FPS world, and I'm finding "old" UT99 resources hard to come by :).

Anywho, thanks again :).
 

Shambler[sixpack]

New Member
May 3, 2001
564
0
0
Ireland
Visit site
Ah ok :)
I would have thought the answer would be there somewhere..here is how I would go about doing it from your new gametype (adding this function):

Code:
function Login(string Portal, string Options, out string Error, class<PlayerPawn> SpawnClass)
{
     SpawnClass = Class'YourPackage.YourPlayerPawnClass';

     Super.Login(Portal, Options, Error, SpawnClass);
}

Try that ;) if it doesn't work double check to see that the game is using the correct gametype.
 

DescX

New Member
May 20, 2004
3
0
0
Shambler, you are the man ;).

That was pretty damn close to the actual solution. I suppose it has something to do with me being on an older UScript base, but this is what I had to do:
Code:
function playerpawn Login( string Portal, string Options, out string Error, class<playerpawn> SpawnClass ) {
	local PlayerPawn plr;
	SpawnClass = Class'MyPack.MyPlayerClass';
	plr = Super.Login( Portal, Options, Error, SpawnClass );
	return plr;
}
Thanks again for the help sir. Getting used to how abstract all of the UScript code base is laid out is quite a new experience, and you just made my day quite a bit easie.

...Did I already say thanks? ;)