Exactly.
You just make a single gamerules class, like CModGamerules which has
different thinks, if the rules are totally different, and runs in diff ways
etc etc. default it to "not initialized" create an entity like I dunno, uhh,
info_frontline.
When info_frontline is spawned, call Gamerules->Initialize(mode); (or
whataver) with whatever mode.,
Now the gamerules think function can call other loop funcs.
Ie: I have like this for example:
void CHL2MPRules::Think()
{
If mode == tactics
tacticsthink()
else if mode == classic
classicthink()
}
Blah blah
It's simple if ya use your noggin, and think about It [EMAIL PROTECTED] ps
listen
to botman.
Oh and me, yeah, me.
-----Original Message-----
From: Jeffrey "botman" Broome [mailto:[EMAIL PROTECTED]
Sent: June 2, 2005 12:13 PM
To: [email protected]
Subject: Re: [hlcoders] Different Gamerules based on mapname or entities
Andrew (British_Bomber) wrote:
>
> I take it no one has every created a mod that used multiplegamerules...
>
The problem isn't that you can't create multiple gamerules classes, the
problem is that you are trying to use entity information which isn't
available until after the gamerules class has been created.
I suppose if you really wanted to, you could create code to open the map
file, read through the entities yourself to find the "gamerules" entity,
then create a gamerules class that matches the type speified by the
entity in the map.
--
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.4.1 - Release Date: 02/06/2005
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders