Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Red Orchestra: Ostfront 41-45 Forums > Red Orchestra Modifications > Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2007, 03:34 PM
mat69 mat69 is offline
Senior Member
 
Join Date: Aug 2006
Posts: 826
Default Replacing ROObjTerritory

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;
}
Reply With Quote
  #2  
Old 09-30-2007, 12:42 PM
mat69 mat69 is offline
Senior Member
 
Join Date: Aug 2006
Posts: 826
Default

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[i] is allways "none", so it never enters that part, allthough the function SpawnModObjectives() is conducted.

Can someone help me here?
Reply With Quote
  #3  
Old 10-01-2007, 11:17 AM
Divinehammer's Avatar
Divinehammer Divinehammer is offline
Senior Member
 
Join Date: Mar 2006
Location: Sunny, Obamalot
Posts: 1,391
Default

What is it that you are trying to do? What is your objective of the change that would help.
__________________
People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf. -George Orwell
Maps: Dubrava, Pavlov's House
Shared Links
Reply With Quote
  #4  
Old 10-01-2007, 11:55 AM
mat69 mat69 is offline
Senior Member
 
Join Date: Aug 2006
Posts: 826
Default

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[i] is none. So there would be nothing there to copy the settings off.
Reply With Quote
  #5  
Old 10-02-2007, 09:05 PM
Deeival Deeival is offline
On Vacation
 
Join Date: Sep 2006
Posts: 674
Default

Bump for the greater good of RO.

Please help Ramm.
Reply With Quote
  #6  
Old 10-06-2007, 06:59 PM
Deeival Deeival is offline
On Vacation
 
Join Date: Sep 2006
Posts: 674
Default

bump.

I'll buy you lunch if you help us with this Ramm.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2013, Tripwire Interactive, LLC