Can anyone get me started in the right direction to figure out how to get the following code set up for replication? The code works great and looks great on a listen server, but when I run it on a dedicated it doesn't. I know I need to add a replication function, but not sure which variable to put in the 'reliable if' statement. I know some of the functions should be simulated...but not sure which ones. And I am really confused on where to add the if ROLE==ROLEAuthority commands. Thanks for any help...this networking programming is confusing for a first timer!
Thanks,
EDGE
Code:
//----------------------------------------------------------- // //----------------------------------------------------------- class TumblerPassengerGun extends ONSWeapon; var class<Projectile> TeamProjectileClasses[2]; var Emitter SmokeTrail[2]; state ProjectileFireMode { function smoke() { SmokeTrail[0] = Spawn(class'SmokeScreen',,,); AttachToBone(SmokeTrail[0], 'PlasmaGunBarrel'); } function Timer() { Level.Game.Broadcast(Level.GetLocalPlayerController(),"timer", 'Say'); SmokeTrail[0].Kill(); } function Fire(Controller C) { if (Vehicle(Owner) != None && Vehicle(Owner).Team < 2) ProjectileClass = TeamProjectileClasses[Vehicle(Owner).Team]; else ProjectileClass = TeamProjectileClasses[0]; Super.Fire(C); } function AltFire(Controller C) { smoke(); SetTimer(5.8,false); } function CeaseFire(Controller C) { Level.Game.Broadcast(Level.GetLocalPlayerController(),"cease", 'Say'); SmokeTrail[0].Kill(); } } defaultproperties { TeamProjectileClasses(0)=Class'Arkon2004.DGrenadeProj' TeamProjectileClasses(1)=Class'Arkon2004.DGrenadeProj' YawBone="PlasmaGunBarrel" YawStartConstraint=46152.000000 YawEndConstraint=52152.000000 PitchBone="PlasmaGunBarrel" PitchUpLimit=4000 PitchDownLimit=-4000 WeaponFireAttachmentBone="PlasmaGunBarrel" WeaponFireOffset=100.000 FireInterval=8.000000 AltFireInterval=6.0000 GunnerAttachmentBone="PlasmaGunAttachment" Mesh=Mesh'ONSWeapons-A.PlasmaGun' i=0 }
EDGE
Comment