Xyx
07-22-2006, 07:57 PM
I've made a variation on the Energy Turret (http://www.ataricommunity.com/forums/showthread.php?t=526116). Works fine offline, but when I start a dedicated server and log on, the turrets are missing.
The mutator cycles through all turrets in its BeginPlay event and replaces each turret's gun. It does not replace the turrets themselves.
simulated function BeginPlay()
{
local ONSManualGunPawn MGP;
super.BeginPlay();
foreach AllActors(class'ONSManualGunPawn', MGP)
{
// Replace GunClass.
MGP.GunClass = GunClass;
if(MGP.Gun != none)
{
// Replace Gun.
MGP.Gun.Destroy();
MGP.Gun = MGP.Spawn(MGP.GunClass, MGP,, MGP.Location);
}
}
}
I'm doing it this way because I could not replace the turrets themselves. Does anyone know of a working turret replacement mutator?
Note: the Energy Turrets themselves are invisible, everything you see is the gun's mesh. The turrets might actually be there, but since they have no mesh of their own they cannot be seen either way).
Suggestions? Any additional information?
The mutator cycles through all turrets in its BeginPlay event and replaces each turret's gun. It does not replace the turrets themselves.
simulated function BeginPlay()
{
local ONSManualGunPawn MGP;
super.BeginPlay();
foreach AllActors(class'ONSManualGunPawn', MGP)
{
// Replace GunClass.
MGP.GunClass = GunClass;
if(MGP.Gun != none)
{
// Replace Gun.
MGP.Gun.Destroy();
MGP.Gun = MGP.Spawn(MGP.GunClass, MGP,, MGP.Location);
}
}
}
I'm doing it this way because I could not replace the turrets themselves. Does anyone know of a working turret replacement mutator?
Note: the Energy Turrets themselves are invisible, everything you see is the gun's mesh. The turrets might actually be there, but since they have no mesh of their own they cannot be seen either way).
Suggestions? Any additional information?