I am trying to set the Variable 'MMMutator' in the infoactor 'spawnermasterinfo' to A mutator that is in the map
But I dont get it done for the client side. if works offline though. anyone can help me?
I know there are some other topics about replication, and with links to tutorials. Ive read them.
also I tried alot but I cant get it to work. When I play as a client I get bot client messages ( see function Tick in the code)
but the MMMutator stays as 'none'
Code: Select all
//=============================================================================
// SpawnerMasterInfo.
//=============================================================================
class SpawnerMasterInfo expands PlayerreplicationInfo;
var MM_Mutator MMMutator;
//Rakiayn: the MM_mutator
replication
{
reliable if ( Role == ROLE_Authority )
FindMutator,
}
simulated event Tick(float TimeDelta)
{
if (mmmutator == none)
{
findmutator();
BroadcastMessage("mmutator = none");
}
if (mmmutator != none)
{
BroadcastMessage("mmutator != none");
}
}
simulated function FindMutator()
{
local MM_mutator M;
for (M = level.game.BaseMutator; M != None; M = M.NextMutator)
{
//Rakiayn: Searching Through Mutatorlist
if (M.IsA('MM_Mutator'))
{
Log(class$" Destroyed; MM_Mutator has been found");
MMMutator = M;
}
if (M == none)
{
}
}
}