PDA

View Full Version : Getting a mod started, simple prob i think..


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

Farbs
16th May 2001, 07:37 AM
Okay, I have to admit that I don't know how to set up the .int so that this will work. All I can think of is to grab some examples and check out how they work.

I can however offer a temporary workaround and a handy tip:

/**/ Use UEd to load / create a level, and set the default game info level property to unrealism. Be sure to open the level either via UEd or with the "open" command, and you'll get to use your gameinfo. It's only a workaround, but it'll allow you to continue working on the mod while you're figuring out the .int problem.

/**/ Grab a copy of CUTools from:

http://www.planetunreal.com/cosmic/developer.html

This is a hella-useful debugging/testing tool which in this case will let you see what gameinfo has been created for the level, so you'll be able to tell whether or not your mod is in use.

namu
16th May 2001, 04:01 PM
Use PostBeginPlay() instead of beginPlay() ?

But then again... i just know nothing...