Ok, my situation is this:
I ripped some of MOTDcolors code so I can get functional HUD. I have made a replication like this:
class BMReplicationInfo expands ReplicationInfo;
Var int BMSavePlayerNumber;
Var string BMSavePlayerpassword;
Var bool PWGOOD;
Var bool HUDUP;
Var string PlayerName;
replication
{
unreliable if(Role == ROLE_Authority)
BMSavePlayerNumber,BMSavePlayerpassword,PWGOOD,PlayerName,HUDUP;
}
I have HUD from MOTDcolor, but I cant make it “interactive”. I change values for the replication and they work fine in the actual functional mutator (BMadmin).
In “class BMInfo expands Mutator;” I have codes like this:
simulated event PostRender( canvas Canvas )
{
if (!PWGOOD)
{
DrawSomething(Canvas);
}
else DrawSomethingElse(Canvas);
if( nextHUDMutator != None )
nextHUDMutator.PostRender( Canvas );
}
simulated Function BMReplicationInfo GetBMReplicationInfo(pawn pawn)
{
local BMReplicationInfo VasRInfo, temp;
local int I;
for (i=0; i<ArrayCount(REPLINFO2); i++)
REPLINFO2[i] = None;
temp = none;
i=0;
foreach AllActors(class’BMReplicationInfo’, VasRInfo)
{
REPLINFO2[i] = VasRInfo;
i +=1;
If (VasRInfo.owner == pawn)
{
temp = VasRInfo;
}
}
return temp;
}
simulated function Timer()
{
If (!foundREPL)
{
If (getBMReplicationInfo(pawn(Owner)) != NONE)
{
REPLINFO = getBMReplicationInfo(pawn(Owner));
foundREPL=true;
}
}
If (foundREPL)
{
HUDUP=REPLINFO.HUDUP;
PWGOOD = REPLINFO.PWGOOD;
}
}
simulated function Tick(float DeltaTime)
{
Super.Tick(DeltaTime);
If (!init)
nultime +=1;
If (nultime >= 10)
{
nultime =0;
RegisterHUDMutator();
}
}
What this does is that DrawSomething is done, but when I change variable PWGOOD=true elsewhere DrawSomethingElse wont come up. Im hopeless