HL2DM -> Round based

  • Thread starter blazertailgunner
  • Start date
B

blazertailgunner

Guest
I'm looking to incoroprate a simple Round Based gametype [2 teams, no respawns] into my mod.

Picking through hl2mp_gamerules.cpp, I see alot of references to team based combat, but am having a hard time putting the peices together to make it work.

Is there a semi-straightforward approach to getting this to work? I'd be willing to use another mod's code for this [and credit will be given], as it seems there are a lot of mods out there with already running round based combat.

If not, coding suggestions would help alot too!
thanks!

-BT
 
It seems pretty simple. Just force team-play in the code (as the HL2DM code already has a teamplay option), add an entity that thinks every second (make it spawn on map start), and whenever it goes through so many thinks...well, that's when it gets harder. You've gotta figure out how to reset all entities.

-Angry Lawyer
 
Angry Lawyer said:
It seems pretty simple. Just force team-play in the code (as the HL2DM code already has a teamplay option)

Hmm, i think i'll start there. Do you mean uncommenting the large blocks of code relating to team play? I can't tell if team play is just disabled or if the code i'm seeing is obsolete.

Any thoughts?
 
mabufo said:
Post some code, maybe we can make some sense of it!

well, i'm having a hard time telling [like i said above] what has been commented out for a TDM reason or what is simply obsolete code.

the code i'm speaking of comes in large segments and thru multiple files. in a perfect world, i could just change a 'false' to a 'true' and i would have my team setup! but i don't think it's that easy.

there are many mods out that speak of such a change, i was hoping one of them could point me in the right direction... that or another knowledgable source, and there seem to be some around here! :cheers:

-BT
 
Well, clean build the mod, start up the game, and try to turn on teamplay the same way as you would in HL2DM. If it works, you know it's just a variable you have to force.

-Angry Lawyer
 
Angry Lawyer said:
start up the game, and try to turn on teamplay the same way as you would in HL2DM.

wait a tic, is there an easy console command to already be able to turn on team play on the fly?
 
If you can force it in the map, you can force it in the code.

*looks at the link*

Have a look at env_global in the code, and see what it actually calls when it runs set_teamplay_on. It could be just a console command, in which case all you have to do is edit the CVAR to default as 1.

-Angry Lawyer
 
Back
Top