Hi all.
I've got just another replication emitter issue. I am playing with Spiral.uc emitter - I wanted to customize it a little by allowing to change the color of the emitter (that is spawned dynamically at runtime). The code below works on the server, but not on the clients. Function calls should be replicated, so is it the problem that the variables Emitters[0].Textures...bla bla aren't ?
Is there some way around this? I've found some emitter tutorials, even with dynamic emitter control, but it just doesn't seem it works. :-/
Thx.
sk
I've got just another replication emitter issue. I am playing with Spiral.uc emitter - I wanted to customize it a little by allowing to change the color of the emitter (that is spawned dynamically at runtime). The code below works on the server, but not on the clients. Function calls should be replicated, so is it the problem that the variables Emitters[0].Textures...bla bla aren't ?
Is there some way around this? I've found some emitter tutorials, even with dynamic emitter control, but it just doesn't seem it works. :-/
Code:
#exec OBJ LOAD FILE=EpicParticles.utx
class myEmitter extends Emitter;
replication
{
reliable if(Role == Role_Authority)
SetFirstColor, SetSecondColor;
}
simulated function SetFirstColor(Color firstColor)
{
Emitters[0].ColorScale[1].Color = firstColor;
}
simulated function SetSecondColor(Color secondColor)
{
Emitters[0].ColorScale[2].Color = secondColor;
}
defaultproperties
{
Begin Object Class=SpriteEmitter Name=SpriteEmitter2
UseColorScale=True
ColorScale(0)=(Color=(B=255,G=255,R=255))
ColorScale(1)=(RelativeTime=0.200000,Color=(G=170,R=255))
ColorScale(2)=(RelativeTime=1.000000,Color=(G=217,R=255))
FadeOutStartTime=1.300000
FadeOut=True
FadeInEndTime=0.250000
FadeIn=True
MaxParticles=15
StartLocationShape=PTLS_Sphere
SphereRadiusRange=(Min=16.000000,Max=16.000000)
RevolutionsPerSecondRange=(Z=(Min=0.200000,Max=0.500000))
RevolutionScale(0)=(RelativeRevolution=(Z=2.000000))
RevolutionScale(1)=(RelativeTime=0.600000)
RevolutionScale(2)=(RelativeTime=1.000000,RelativeRevolution=(Z=2.000000))
SpinsPerSecondRange=(X=(Max=4.000000))
StartSizeRange=(X=(Min=4.000000,Max=4.000000),Y=(Min=4.000000,Max=4.000000),Z=(Min=8.000000,Max=8.000000))
UniformSize=True
Texture=Texture'EpicParticles.Flares.HotSpot'
LifetimeRange=(Min=1.600000,Max=1.600000)
StartVelocityRadialRange=(Min=-20.000000,Max=-20.000000)
VelocityLossRange=(X=(Min=0.200000,Max=0.200000),Y=(Min=0.200000,Max=0.200000),Z=(Min=1.000000,Max=1.000000))
GetVelocityDirectionFrom=PTVD_AddRadial
UseVelocityScale=True
VelocityScale(0)=(RelativeVelocity=(X=2.000000,Y=2.000000,Z=2.000000))
VelocityScale(1)=(RelativeTime=0.600000)
VelocityScale(2)=(RelativeTime=1.000000,RelativeVelocity=(X=-10.000000,Y=-10.000000,Z=-10.000000))
LowDetailFactor=+1.0
Name="SpriteEmitter7"
End Object
Emitters(0)=SpriteEmitter'SpriteEmitter2'
bNoDelete=false
bReplicateInstigator=True
bAlwaysRelevant=True
bDynamicLight=True
bNetTemporary=False
bHidden=False
RemoteRole=ROLE_SimulatedProxy
CullDistance=+2000.0
}
Thx.
sk