PDA

View Full Version : Assigning physics to the player



legacy-StarMech_LX
08-04-2003, 02:14 AM
I'm trying to make a fly mutator... just a little exercise and something to learn from, i got the bots to fly, that was easy, now i gotta get the player to fly... now about a month later i decide to post in the forum abuot it :D heres what i have:
//================================================== ===========================
// Fly.
//================================================== ===========================
class Fly extends Mutator;
var bool bFlyDumb;
function PreBeginGame()
{
SetTimer(0.00001, true);
}
function SetMovementPhysics()
{
Local Controller C;
for (C = Level.ControllerList; C != None; C = C.NextController)
{
If ( C.Pawn.Physics != PHYS_Flying )
C.Pawn.SetPhysics(PHYS_Flying);
if ( bFlyDumb )
{
SetPhysics(PHYS_Flying);
bFlyDumb = false;
}
}
}
function ModifyPlayer( Pawn Dumb )
{
Local Controller C;
for (C = Level.ControllerList; C != None; C = C.NextController)
{
If ( C.Physics != PHYS_Flying )
SetPhysics(PHYS_Flying);
Dumb.bCanFly = true;
}
}
function Timer()
{
Local Controller C;
for (C = Level.ControllerList; C != None; C = C.NextController)
{
If ( C.Pawn.Physics != PHYS_Flying )
bFlyDumb = true;
else
bFlyDumb = false;
}
}

Can't get it to work... i have like 5 things trying to change the physics at once... heh.

Well take your time, i'm just sittin here... eatin angel food cake... runnin out :eek:

thanks

Yup... it's gone now :( ... and my Log() doesn't work!! :cry: