Hi,
I'm trying to create a mutator that will allow to scale the CountdownTime value of ROObjective, because I want to modify the default value hard-coded in the maps. ROGameInfoCountdown uses ROObjective.CountodwnTime to assign WorldInfo.GRI.RemainingTime. ROObjective instances are stored in an array named Objectives. That array can be found in ROGameInfoTerritories, and ROGameReplicationInfo.
At first I tried this code:
Then this:
The problem is that only the current "active" objective gets updated. Any idea why? And how does replication work? Thanks.
P.S.: Sorry for the cast that repeats.
I'm trying to create a mutator that will allow to scale the CountdownTime value of ROObjective, because I want to modify the default value hard-coded in the maps. ROGameInfoCountdown uses ROObjective.CountodwnTime to assign WorldInfo.GRI.RemainingTime. ROObjective instances are stored in an array named Objectives. That array can be found in ROGameInfoTerritories, and ROGameReplicationInfo.
At first I tried this code:
Code:
for ( i = 0; i < ROGameInfoTerritories(self.WorldInfo.Game).Objectives.Length; i++ )
{
if ( ROGameInfoTerritories(self.WorldInfo.Game).Objectives[i] != none )
{
ROGameInfoTerritories(self.WorldInfo.Game).Objectives[i].CountdownTime = 2*ROGameInfoTerritories(self.WorldInfo.Game).Objectives[i].CountdownTime;
}
}
Then this:
Code:
for ( i = 0; i < ROGameReplicationInfo(WorldInfo.GRI).Objectives.Length; i++ )
{
if ( ROGameReplicationInfo(WorldInfo.GRI).Objectives[i] != none )
{
ROGameReplicationInfo(WorldInfo.GRI).Objectives[i].CountdownTime = 2*ROGameReplicationInfo(WorldInfo.GRI).Objectives[i].CountdownTime;
}
}
The problem is that only the current "active" objective gets updated. Any idea why? And how does replication work? Thanks.
P.S.: Sorry for the cast that repeats.
Last edited: