replication for redeemer rocket ?

  • 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.

gor

New Member
Dec 30, 2001
40
0
0
AUS
Visit site
Hi, Ive made a redeemer for Unreal1 but have no clue as to how to get the guided missile working over the net.

The base code was form a wepaon called the GML and I sorta mashed the code up to now work prtty much like the redeemer.

2 probs:

1.The guided missile doesnt wokr over the net - instead it just spawns a missle in mid air and thats it.

2.When your flying the roket how do i make it so the player model is still and cant jump ?


Ive included a small map file below which has the code in it.

Under QuadShot is MyQuadShot ... (creative huh?)

and it uses a prjectile called --> nukehead for the guided missle thingy.

Please help me get it working Im pretty much past my limit to get it where it is !
thanks.
 

gor

New Member
Dec 30, 2001
40
0
0
AUS
Visit site
this is the rocket part:

//=============================================================================
// nukehead.
//=============================================================================
class nukehead expands Projectile;

var actor oldviewtarget;
var class<projectile> projclass;
var bool bDriving;

replication

{
// Things the server should send to the client.
unreliable if( Role==ROLE_Authority )
oldviewtarget, bDriving;
}

function PostBeginPlay()
{
oldviewtarget=PlayerPawn(instigator).viewtarget;
PlayerPawn(instigator).ViewTarget=self;
if ( Role == ROLE_Authority )
velocity=vector(Rotation)*Speed;
}

function Explode(vector HitLocation, vector HitNormal)
{
HurtRadius(Damage,300.0, 'burned', MomentumTransfer, HitLocation );
Spawn(class'BallExplosion',,,HitLocation+ HitNormal*16);
spawn(class'SpriteBallExplosion',,,HitLocation+ HitNormal*16);
playerpawn(instigator).ClientAdjustGlow(0.2,vect(-200,0,0));
playerpawn(instigator).viewtarget=oldviewtarget;
MyQuadShot(instigator.weapon).bDriving=False;
playerpawn(instigator).SwitchToBestWeapon();
RemoteRole = ROLE_SimulatedProxy;
Destroy();
}

function Tick(float deltatime)
{
local vector x,y,z;

SetRotation(PlayerPawn(Instigator).ViewRotation);
GetAxes(Rotation,x,y,z);
Velocity=vsize(Velocity)*x;
}

function ProcessTouch(actor other, vector HitLocation)
{
if(Other.instigator!=instigator)
explode(HitLocation, vector(Rotation));
}
 
Last edited:

gor

New Member
Dec 30, 2001
40
0
0
AUS
Visit site
this is the gun part:

//=============================================================================
// MyQuadShot.
//=============================================================================
class MyQuadShot expands QuadShot;

var nukehead piloted;
var bool bDriving;

replication
{
// Things the server should send to the client.
unreliable if( Role==ROLE_Authority )
bDriving;
}

function PreBeginPlay()
{
bDriving=False;
}


function nukehead missileFire(class<nukehead> ProjClass, float ProjSpeed, bool bWarn)
{
local Vector Start, X,Y,Z;
local Pawn PawnOwner;

PawnOwner = Pawn(Owner);
Owner.MakeNoise(PawnOwner.SoundDampening);
GetAxes(PawnOwner.ViewRotation,X,Y,Z);
Start = Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = PawnOwner.AdjustAim(ProjSpeed, Start, AimError, True, bWarn);
return Spawn(ProjClass,,, Start,AdjustedAim);

}

function fire(float value)
{
if(!bDriving)
{
if(Ammotype.UseAmmo(1))
{
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
PlayerPawn(Owner).ClientAdjustGlow(-0.2,vect(200,0,0));
piloted=missileFire(class'nukehead',600,True);
bDriving=True;
}
}
}
 
Last edited:

gor

New Member
Dec 30, 2001
40
0
0
AUS
Visit site
..oh beleive me Ive spent hours with the redeemer code going through what it does and trying to figure out what this is doing etc..

Ive since cleaned the code up for both the launcher and rocket
and im hoping I could just add the relevent networking info..
is that not possible ?

I got it to now be able to shoot off the rocket and you control it
but you cant steer it or anything so you just fly into the wall
and then its also very laggy.,,.

Please just note that I am a total newbie at this.. Ive done a couple of basic things and I know how to muck around with code but I dont anything technical.. I cant write my own code
I only copy paste :) thanks for any help.

should I post my new code ?