Replacing ROObjTerritory

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

mat69

FNG / Fresh Meat
Aug 1, 2006
826
0
0
Hello, I want to create a mutator that modifies ROObjTerritory.

Can someone tell me how I can replace ROObjTerritory with my class?
I tried CheckReplacement, but the result was not what I expected (my class seemed not to be loaded).

Code:
function bool CheckReplacement(Actor Other,out byte bSuperRelevant)
{
    if (ROObjTerritory(Other) != None)
    {
       ReplaceWith(Other,"XYZ.maROObjTerritory");
       return false;
    }
    else
        return true;
}
 

mat69

FNG / Fresh Meat
Aug 1, 2006
826
0
0
Ok, I came to the conclusion that replacing ROObjTerritory is not the best idea ...
So what I want now is to copy all properties of ROOjTerritory-actors on a map and spawn a modified ROObjTerritory-actor that has all the settings.
Probably bot-pathing would not work then, but I could live with that.

Code:
var ROTeamGame GameInfo;
[...]
function SpawnModObjectives()
{
  local int i;
  GameInfo = ROTeamGame(Level.Game);
  for( i = 0; i < 16; i++)
  {
    if( GameInfo.Objectives[i] != none )
    {
    ...
    }
  }
}

The problem is that it seems like GameInfo_Objectives is allways "none", so it never enters that part, allthough the function SpawnModObjectives() is conducted.

Can someone help me here?
 

mat69

FNG / Fresh Meat
Aug 1, 2006
826
0
0
I want to modify the objectives. Yet I want that these changes also work in present maps.

So I intended to search through all Objectives, spawn new Objectives that are based on my class, copy all the settings from the initial Objectives and deactivate them later on.

Yet it seems that GameInfo_Objectives is none. So there would be nothing there to copy the settings off.