Note This is for UT 99 not UT2004.
I was wondering if any one could offer some help or suggestions?
Ive made a player controlled projectile similar to the redeemer. Its actually some kind of helicopter but I might do other projectiles and an aircraft later *IF* I can get it to work.
The problem is I dont want to make execs and seperate binds to make it fly.
The simple solution would of been to access the pilots aforward, aBaseY, aStrafe etc but they always return a value of 0.
Next solution I thought perhaps using bWasForward, bWasLeft etc but they just refuse to replicate, Theyre fine local but in netplay no matter what I try it just doesnt work. I tried using and inventory item to try and use it as a controller but still no luck.
Anyway.. I'm trying to make my own ver of aforward and astrafe. For lack of a better solution.
When a player bumps into it it sets the player as the owner (pilot)
The above works but no cigar. If im not moving forward and I press a strafe key while turning it returns a positive or negative value..Not 0
}
The above seems to work but in network play the floats arent quite accurate which is why <1 and > 1 and not 0 (maybe 1 needs to be higher?)
When I strafe and turn while NOT moving forward, aforward.z is always 0 (fortunately).
I need to make a strafe ver of this but im stumped. The strafe has to be seperate and not effected by forward movement and turning such as if strafe left and strafe right keys were pressed. Or it'll strafe when not wanted.
Anyone have any suggestions?
cheers
I was wondering if any one could offer some help or suggestions?
Ive made a player controlled projectile similar to the redeemer. Its actually some kind of helicopter but I might do other projectiles and an aircraft later *IF* I can get it to work.
The problem is I dont want to make execs and seperate binds to make it fly.
The simple solution would of been to access the pilots aforward, aBaseY, aStrafe etc but they always return a value of 0.
Next solution I thought perhaps using bWasForward, bWasLeft etc but they just refuse to replicate, Theyre fine local but in netplay no matter what I try it just doesnt work. I tried using and inventory item to try and use it as a controller but still no luck.
Anyway.. I'm trying to make my own ver of aforward and astrafe. For lack of a better solution.
When a player bumps into it it sets the player as the owner (pilot)
Code:
var float Goforward;
var vector accel,vrot;
simulated function Tick(float DeltaTime)
{
accel = Pilot.Acceleration;
vrot = vector(Pilot.rotation);
Goforward = Normal(accel) dot Normal(vrot);
if ( Goforward > 0 )
{
if ( speed<default.speed)
speed+= 10.0;
else
speed=default.speed;
}
etc etc
}
The above works but no cigar. If im not moving forward and I press a strafe key while turning it returns a positive or negative value..Not 0
Code:
var vector accel, vrot, afoward;
simulated function Tick(float DeltaTime)
{
accel = Pilot.Acceleration;
vrot = vector(Pilot.rotation);
aforward = accel*vrot;
if ( aforward.x + aforward.y >1 && aforward.z !=0)
{
if ( speed<default.speed)
speed+= 10.0;
else
speed=default.speed;
}
etc etc
The above seems to work but in network play the floats arent quite accurate which is why <1 and > 1 and not 0 (maybe 1 needs to be higher?)
When I strafe and turn while NOT moving forward, aforward.z is always 0 (fortunately).
I need to make a strafe ver of this but im stumped. The strafe has to be seperate and not effected by forward movement and turning such as if strafe left and strafe right keys were pressed. Or it'll strafe when not wanted.
Anyone have any suggestions?
cheers