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.

k questions about playerInput:

Discussion in 'Ask a Coder' started by Call me Erdrik, Jan 25, 2002.

  1. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    I made a new playerpawn class under tournament player.
    This player has a state called pilot(which is called when he picks up a SR_Item, Ill explian that below as its extended.. :p) in this state i have : (Im doing this from memory :p )

    event function PlayerInput(float DeltaTime)
    {
    super.PlayerInput(DeltaTime);

    if (bwasforward) Ship.UpAccel(DeltaTime);

    }
    I have a variable called var SR_MainHull ship
    when the player touches the SR_MainHull(new class I coded) which sub classed to SR_Item; the new giveto() function i coded(exactly the same as normal except I added other functions) sets the variable(var SR_MainHull ship) in the player to it self.

    The SR_MainHull then goes to a state called 'state running'
    a timer sets the player location to the MainHull makes the player colide false (all three of them).
    in MainHull the function:

    function UpAccel(DeltaTime)
    {
    local vector Currvelocity;
    //I have code here to determine the variable ithrust which
    // in the very least is 10. I can't remember it all now Ill post later
    currVelocity = (rotation)*ithrust;
    // ^ pretty sure if this is right I can't remember to clearly
    velocity = CurrVelocity;
    ProcessMove(buncha variable I can't remeber);
    }

    function ProcessMove(buncha variable I can't remeber+newaccel)
    {
    newaccel = velocity;
    smoothmove(can't remember)
    }


    I know im being a little hazy but Ill correct the stuff when I get home from work....
    ingame I can pick it up fine and the location is set properly but when i hit the up key nothing happens.... plus I can't seem to mouse look any...
    in the mean time, any ideas?
     
  2. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    errr umm I figured it out. turns out the ithrust variable was not increasing past 0. thus I wasn't moving :p
     

Share This Page