I don't need to run any sound in any server when is about custom stuff. I used to spawn custom AmbientSounds in clients without a single problem (in map MH-Forbidden, btw where are missing two or three sounds for those torches), exactly as I have dynamic coronas, dynamic lights, and all these are client-side exactly like decals (of course decals are natively supported in clients). Since I'm working for custom patch plugins I've learned how to replicate almost without a lot of replication - replicated thing is a notifier which returns execution to none if is in a Server and keeps spawning or moving into a state code when is in client or non-dedicated server, is actually piece of cake... Higor hinted me with such things and later I could do similar stuff simplified. All actors used this way (CLIENT target) don't have RemoteRole. and YES I'm not running any light or sound in server when is about custom actors non-mapped actors, simple as that. Bots don't care about lights and sounds - player has problems here, so I help only player.
Sample:
Code: Select all
simulated function PostBeginPlay()
{
local actor A;
if ( Level.NetMode == NM_DedicatedServer )
return;
Super.PostBeginPlay();
log ("Deco Notify Initialized...");
ForEach AllActors(class'actor',A)
{
if ( A.IsA('Lamp1') )
{
A.ScaleGlow = 240;
A.bUnlit = True;
if ( A.DrawScale == 1.000000 )
Spawn(class'Crn_Light',,,A.Location+vect(0,0,64)).LightBrightness=16;
continue;
}
if ( A.IsA('Lantern2') )
{
A.ScaleGlow = 240;
A.bUnlit = True;
Spawn(class'Crn_Light',,,A.Location).LightBrightness=12;
continue;
}
if ( A.IsA('Lantern') )
{
A.ScaleGlow = 240;
A.bUnlit = True;
Spawn(class'Crn_Light',,,A.Location).LightBrightness=12;
continue;
}
if ( A.IsA('TorchFlame') )
{
Spawn(class'BurningLight',,,A.Location+vect(0,0,1));
continue;
}
if (string(A.Name) ~= "WaterZone0") // Position 320
{
WaterZone(A).AmbientBrightness += 4;
WaterZone(A).ViewFog = vect(0.02,0.02,0.02);
WaterZone(A).Default.ViewFog = vect(0.02,0.02,0.02);
continue;
}
if (string(A.Name) ~= "Mover17") // Position 323
{
Mover(A).KeyPos[1] = vect(0,182,0);
continue;
}
if (string(A.Name) ~= "WaterZone1") // Position 912
{
WaterZone(A).AmbientBrightness += 4;
WaterZone(A).ViewFog = vect(0.02,0.02,0.02);
WaterZone(A).Default.ViewFog = vect(0.02,0.02,0.02);
continue;
}
if ( string(A.Name) ~= "Mover35" ) // Position 954
{
Mover(A).BasePos = vect(1920,-11152,1326);
continue;
}
if (string(A.Name) ~= "Mover9") // Position 960
{
Mover(A).KeyPos[1] = vect(0,-384,0);
continue;
}
if (string(A.Name) ~= "Mover37") // Position 961
{
Mover(A).KeyPos[1] = vect(0,320,0);
continue;
}
if (string(A.Name) ~= "Mover42") // Position 962
{
Mover(A).KeyPos[1] = vect(0,320,0);
continue;
}
if (string(A.Name) ~= "Mover43") // Position 963
{
Mover(A).KeyPos[1] = vect(0,-320,0);
continue;
}
}
A = none;
SpawnOtherStuff();
}
SpawnOtherStuff is already working only in client because everything was logged before as it's all tested... and code has been already stopped before in dedicated server. I even have a basic log for confirmation if plugin is loaded and something did not went wrong.
Here can be hunted Level's Owner (the one with Console because we are in client) and if client-sound has a failure I can spawn another actor nearby owner location and making sound and... dying.
@Aldebaran - Do you recall that MonsterShadow stuff which I sent you ? Feel free to do stunts there because it works almost in the same way - Client-Side, my friend, Client-Side...