Announcement

Collapse
No announcement yet.

Hi all... Qns on Scorekill Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Yes, you will need a gamerules class, which you can spawn and add to the game rules using this in your PostBeginPlay() in your mutator:

    Code:
    function PostBeginPlay() {
    local GameRules GR,NEWRULES;
    local bool AddedRule;
    
     for ( GR=Level.Game.GameRulesModifiers; GR!=None;  GR=GR.NextGameRules ) {
    	if ( GR.IsA('MyGameRules') ) AddedRule=True;
     }
     if (!AddedRule) {
      NEWRULES = Spawn(class'MyGameRules');
      if (Level.Game.GameRulesModifiers == None) Level.Game.GameRulesModifiers = NEWRULES;
      else Level.Game.GameRulesModifiers.AddGameRules(NEWRULES);
     }
    }

    Leave a comment:


  • replied
    In ut04 I think you would subclass gamerules but I'm not sure. Take a look at some of the other mutators like lowgrav which uses it's own gamerules class.

    Leave a comment:


  • started a topic Hi all... Qns on Scorekill Functions

    Hi all... Qns on Scorekill Functions

    Hi all, i am new here(noob as most pple would call it^^). Pardon my ignorance, but i would like to ask how do i overwrite the scorekill function. I explored UT and realise some changes from UT 2003 which i am currently coding in. From my limited knowledge scorekill function used to be in the Mutator Function but no in UT2003. My intention is to write a mutator to overwrite the Scorekill Function to include some effects after a kill.

    For example: after each kills, the killer will have MaxHealth +=10. In UT i could have easily overwrite the function in MYMutator extends Mutator. But somehow in UT2003, when i try to compile it says function Scorekill not known or something like tt. I did some research and found tt Scorekill Function hmeIave since moved to class Gameinfo. So i was wondering is there anyway i could overwrite tt function in my Mutator? Or is this not allowed due to mutators compatibility issues ? If it is the latter is there anyway for me to overwrite scorekill function?
Working...
X