Multicast delegates

When my camera actor gets inside water volume, it should notify several actors (weather effects manager, wind directional source, post process manager etc). Currently, I can reference only one of them. Is there any way to implement multicast?

Camera collider



event PhysicsVolumeChange(PhysicsVolume NewVolume)
{
    If (LZ_Volume_Water(NewVolume) != None && LZ_Volume_Water(NewVolume).VolumePostProcess != None)
    {
        EnteredWaterVolume(NewVolume);
    }
    else
    {
        LeftWaterVolume();
    }
}

delegate EnteredWaterVolume(PhysicsVolume V);
delegate LeftWaterVolume();


Weather effects manager OR Wind directional source (same code)



function InitWeatherEffects()
{
        BaseActor = Legend_Camera(PC.PlayerCamera).DummyActor;
        If (BaseActor != None)
        {
            // Init camera dummy delegates
            BaseActor.EnteredWaterVolume = BaseEnteredWaterVolume;
            BaseActor.LeftWaterVolume = BaseLeftWaterVolume;
        }
}

function BaseEnteredWaterVolume(LZ_Volume_Water V)
{
    bIsInWater = True;
}

function BaseLeftWaterVolume()
{
    bIsInWater = False;
}


do you mean a networking UE4 Multicast? im not sure of what you mean= ?

I need a single delegate to hold multiple references. Something like:


SomeActor.CollisionDelegate = OtherActor1.MyFunction + OtherActor2.MyFunction;

Or:


For(a=0;a<OtherActors.Length;a++)
{
      if (SomeActor.CollisionDelegate == None)
            SomeActor.CollisionDelegate = OtherActors[a].MyFunction;
      else
            SomeActor.CollisionDelegate  = SomeActor.CollisionDelegate + OtherActors[a].MyFunction;
}