My task: to get the references to a custom LevelInfo (UaLevelInfo) and the TerrainInfo from an Interaction.
Offline: works fine. Use a foreach DynamicActors
Online: nothing. I know that Interactions are not Actors, so can't replicate, so I created a function in my custom PlayerController:
This also doesn't work. I'm assuming that because it works offline that I have to get the references from the server. The ds isn't returning the "Recieved unwanted function" error from this code, but it doesn't work (both returned values are None). Is my replication logic wrong or is there something else at work here?
Just remembered the problem with functions returning values. Is that the problem here? And if so, how would I fix it?
Offline: works fine. Use a foreach DynamicActors
Online: nothing. I know that Interactions are not Actors, so can't replicate, so I created a function in my custom PlayerController:
Code:
// functions client calls on the server
unreliable if (Role < ROLE_Authority)
InitInteraction;
function InitInteraction(out UaLevelInfo Level, out TerrainInfo Terrain)
{
foreach DynamicActors(class'UaLevelInfo', Level)
break;
foreach DynamicActors(class'TerrainInfo', Terrain)
break;
}
This also doesn't work. I'm assuming that because it works offline that I have to get the references from the server. The ds isn't returning the "Recieved unwanted function" error from this code, but it doesn't work (both returned values are None). Is my replication logic wrong or is there something else at work here?
Just remembered the problem with functions returning values. Is that the problem here? And if so, how would I fix it?
Last edited: