1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

UScript Acelleration (Physics related question)

Discussion in 'Ask a Coder' started by Lost_little_coder, Nov 30, 2004.

  1. Lost_little_coder

    Lost_little_coder New Member

    Nov 30, 2004
    Likes Received:
    Ok...Im a new coder, mostly Ive played with stuff affecting jump height and health etc., but a while back I had the idea of making a Tribes type mutator for UT2004, which would include skiing and the jetpack. "Oh ho!" he thinks. "That cant be too hard! All it needs is to change the player physics to Hovering when they hold down button X and add some vertical acceleration when they press button Y!"
    I've looked all over the net, and can find little to no information on using UScript to affect the acceleration of an object.

    1) How do I affect the acceleration of a Pawn in a given direction?
    2) If I need to change the physics of the pawn, and the acceleration, would it be easier to create a mutator which changes the pawn (using something like the PreBeginPlay() function), or to create a new xTribesPawn as an xPawn subclass?

  2. EvilDrWong

    EvilDrWong Every line of code elevates you

    Jun 16, 2001
    Likes Received:
    1) What do you mean? Acceleration isnt protected or anything, you can access and modify it directly.
    2) Either way you cut it, youre gonna have to replace a pawn to simulate skiing, possibly a controller too. Check out state PlayerWalking in Engine.PlayerController, particularly the PlayerMove function. Alternatively, you could look into the possibilities of skiing via the RawInput function of Pawn, as it is given (gasp) raw input directly from the controller and allowed to handle it however it pleases.

Share This Page