UT_Sleeper
16th May 2001, 04:08 AM
I have begun work on a mod, but am having what I believe are simple problems, here is my code so far (i know not much)..
class Unrealism expands TeamGamePlus;
var int timectr;
function beginplay()
{
timectr = 0;
settimer(1.0, true);
}
function timer()
{
timectr++;
if (timectr == 10) {
BroadcastMessage("Increase");
timectr = 0; }
}
defaultproperties
{
GameName = "Unrealism"
}
I know, it does nothing except print a message every 10 seconds (if i can get that working i can begin on the real modding!), but it doesn't work! Here are the problems though:
a) The game name does not show up in the start multiplayer game menu, a new entry is there but it is tournament team game, not unrealism (temp name, until i can think of one)
b) The timer doesn't display the text! but this could be because I'm not actually loading my mod
I have set up UNREALISM.INT, it looks like:
[Public]
Object=(Name=Unrealism.Unrealism,Class=Class,MetaClass=Botpack.TournamentGameInfo)
Preferences=(Caption="Unrealism",Parent="GameTypes",Class=Unrealism.Unrealism,Immediate=True)
Does anyone know why the name does not show up correctly? It is compiled, I do have a unrealism.u file, it compiled fine. Another thing, should I be using the Level.Time variable and checking that every tick, or do you think a timer function is more appropriate?
Thanks
class Unrealism expands TeamGamePlus;
var int timectr;
function beginplay()
{
timectr = 0;
settimer(1.0, true);
}
function timer()
{
timectr++;
if (timectr == 10) {
BroadcastMessage("Increase");
timectr = 0; }
}
defaultproperties
{
GameName = "Unrealism"
}
I know, it does nothing except print a message every 10 seconds (if i can get that working i can begin on the real modding!), but it doesn't work! Here are the problems though:
a) The game name does not show up in the start multiplayer game menu, a new entry is there but it is tournament team game, not unrealism (temp name, until i can think of one)
b) The timer doesn't display the text! but this could be because I'm not actually loading my mod
I have set up UNREALISM.INT, it looks like:
[Public]
Object=(Name=Unrealism.Unrealism,Class=Class,MetaClass=Botpack.TournamentGameInfo)
Preferences=(Caption="Unrealism",Parent="GameTypes",Class=Unrealism.Unrealism,Immediate=True)
Does anyone know why the name does not show up correctly? It is compiled, I do have a unrealism.u file, it compiled fine. Another thing, should I be using the Level.Time variable and checking that every tick, or do you think a timer function is more appropriate?
Thanks