PDA

View Full Version : k questions about playerInput:


Call me Erdrik
25th Jan 2002, 11:25 AM
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?

Call me Erdrik
28th Jan 2002, 10:21 AM
errr umm I figured it out. turns out the ithrust variable was not increasing past 0. thus I wasn't moving :p