ScalePawn?

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

Delphi

New Member
Aug 30, 2004
36
0
0
Okay so I've got the ScalePawn working in the runtime okay and all, but how can I get it working in my mod? Especially if I don't want to use those ScaleBoy and ScaleGirl avatars.

I've got a lovely subclass of Pawn, but it doesn't appear to be used as the getbigger and getsmaller commands are unrecognised.

Any ideas people?
 

porkmanii

New Member
Sep 9, 2004
129
0
0
Australia, Qld
Have you tried sub-classing a game-type and overriding GetDefaultPlayerClass to return your sub-class of pawn, or setting the game type's DefaultPlayerClassName?

Also, are the getbigger and getsmaller commands the only things you've added? If they are, you could probably implement such functionality in a Mutator instead of a Pawn class, which would make it more compatible, as well as (probably) being easier to implement.
 

Delphi

New Member
Aug 30, 2004
36
0
0
porkmanii said:
Have you tried sub-classing a game-type and overriding GetDefaultPlayerClass to return your sub-class of pawn, or setting the game type's DefaultPlayerClassName?

That's a fair point. I think I've just got it working through a trigger so I can set/enforce a different pawn height for different maps. I'll need to do some further testing to make sure it's working okay.

hmmm, okay so why are my feet in the floor?
 

Delphi

New Member
Aug 30, 2004
36
0
0
Any fixes? I found someone refered to DrawPivot, but no clues as how to use it?

Used WOTGreal to do a search for DrawPivot and it didn't find much apart from HUD references.
 
Last edited:

Payback

Ive got a big stick
Nov 21, 2002
94
0
0
ahl.action-web.net
I think the value you need to play with is pawn.prepivot. Im messing with it at the moment to push my pawn out of the ground, although Im having trouble making it replicate at the moment so it only works for me offline (at the moment)
 

Delphi

New Member
Aug 30, 2004
36
0
0
Offline is okay. pawn.prepivot(vector) right? What vector do I need? A reference to the floor or what?
 

Delphi

New Member
Aug 30, 2004
36
0
0
kinda got it now. I upped the Z value of the PrePivot vector until the feet touched the floor again. With the Jakob pawn rescaling to 1.5, the Z value is around 14 or so. At the normal scale for UT2k4 the Z value is -5.0. It's all very hit and miss really? Or does someone have a nicer way of calculating the right adjustment?
 

porkmanii

New Member
Sep 9, 2004
129
0
0
Australia, Qld
Delphi said:
hmmm, okay so why are my feet in the floor?
Have you changed the Pawn's collision size (CollisionHeight and CollisionRadius)? If you scale the collision size exactly as much as you scale the DrawScale, your feet should be just as close (proportionately) to the ground. For example:
Code:
Pawn.DrawScale += 0.25; // add 25%
Pawn.SetCollisionSize(
  Pawn.Default.CollisionRadius / Pawn.Default.DrawScale * Pawn.DrawScale,
  Pawn.Default.CollisionHeight / Pawn.Default.DrawScale * Pawn.DrawScale);
If you are setting the Pawn's DrawScale and not it's collision size, that would not only explain why your feet are in the ground, it would also mean the Pawn would look bigger, but would actually be the same size as before.

Edit- If you are setting the collision size (to 1.5x), wouldn't that move the feet be 2.5 unreal units (if PrePivot.Z == -5)?
 
Last edited:

Delphi

New Member
Aug 30, 2004
36
0
0
Okay don't worry 'bout that, it's happy now. In the ScalePawn example it uses a Pawn.BaseMovementRate to scale the animation speed. I've done a search through the UT2k4 code and it don't exist.

Is there another variable that does the same thing so that my pawn doesn't look like a fairy mincing along.
 
Last edited:

porkmanii

New Member
Sep 9, 2004
129
0
0
Australia, Qld
I dont' think there are any variables for a Pawn's animation rate. I've come across the same problem before, and haven't found a solution. I'm almost certain the Pawn's animations are handled by native code (meaning we can't change the rate they are played at unless there are variables for rate of animation), as the only call to LoopAnim is for the DriveAnim, and the only calls to PlayAnim in Pawn are only executed on a dedicated server.

Edit- the description for BaseMovementRate on the Unreal Wiki is:
FIXME - temp - used for scaling movement
 
Last edited:

Delphi

New Member
Aug 30, 2004
36
0
0
oh well, hopefully the scale change wont be enough to make it too obvious that the animation is out. Thanks for your help.