Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting Question
#1
Hi Eliot! Big fan of your work!

I just had a simple (but hard for me) uscripting question.

I'm trying to make a very small mutator that backs up the ultra best times mutator when playing trial maps.

Currently there is no code to change the Auto Balance Teams Boolean when it's a trial map vs. a standard assault map. I did create a mutator which fixes this problem. But it simple looks at the map name to see if it has the word "Trial" or for those mappers that misspelled "Trail" and configures the game accordingly. However I noticed that ultra best times can determine if its an assault map or trial map without the same method. I've been scanning the source code back and forth for days and I can't figure out how it's doing this.

Heres what I have and it works great unless the map name doesnt have "trial" in it.

Quote:class DexsTRModv1 extends Mutator;

var bool bTrialGame;
var string mapname;

function PostBeginPlay()
{
Local string mapname;

Super.PostBeginPlay();

mapname = caps(string(Level));

if ( InStr(mapname,"TRAIL") != -1 || InStr(mapname,"TRIAL") != -1 )
{
TeamGame(Level.Game).bPlayersBalanceTeams = false;
ASGameInfo(Level.Game).RoundTimeLimit = 100;
bTrialGame = true;
}
else
{
bTrialGame = false;
TeamGame(Level.Game).bPlayersBalanceTeams = true;
}
}

function ModifyPlayer(Pawn Obj)
{
if (bTrialGame)
{
Obj.SetCollision(true, false, false);
}
}

Also one more thing is ultra best times overrides my ASGameInfo(Level.Game).RoundTimeLimit = 100; I know this because it resets the time limit in the MatchStarting function. I didn't know if I can override this setting if ultra best times is initiated after my mutator.

Any help would be appreciated. Thanks in advance!
Reply


Messages In This Thread
Scripting Question - DexterII - 03-20-2012, 08:23 AM
RE: Scripting Question - eliot - 03-20-2012, 04:02 PM
RE: Scripting Question - DexterII - 03-23-2012, 09:02 AM
RE: Scripting Question - eliot - 03-25-2012, 12:39 AM
RE: Scripting Question - DexterII - 03-26-2012, 02:29 AM
RE: Scripting Question - eliot - 04-03-2012, 09:42 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)