Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a gametype multi-rounded?
#1
Well I'm working on a TTT mod for MW2 but I'm currently stumped at making it have rounds.
This is what I'm trying to do:
Code:
    registerTimeLimitDvar( level.gameType, 5, 0, 30); //need more time, so this should be enough....
    registerScoreLimitDvar( level.gameType, 1, 0, 7500 );
    registerWinLimitDvar( level.gameType, 1, 0, 5000 );
    registerRoundLimitDvar( level.gameType, 0, 0, 12 );
    registerWinLimitDvar( level.gameType, 4, 0, 12 );
    registerNumLivesDvar( level.gameType, 0, 0, 10 );
    registerHalfTimeDvar( level.gameType, 0, 0, 1 );

    level.onStartGameType = ::onStartGameType;
    level.getSpawnPoint = ::getSpawnPoint;
    level.onPlayerKilled = :: onPlayerKilled;
    level.onSpawnPlayer = ::onSpawnPlayer;
    level.onDeadEvent = ::onDeadEvent;

ttt_endGame( winningTeam, endReasonText )
{
    thread maps\mp\gametypes\_gamelogic::endGame( winningTeam, endReasonText );
}

onDeadEvent()
{
    if ( level.traitors == 0 )
    {
        level thread ttt_endGame( game["attackers"], game["strings"][game["defenders"]+"_eliminated"] );
    }
    else if ( level.innocents == 0 )
    {
        level thread ttt_endGame( game["defenders"], game["strings"][game["attackers"]+"_eliminated"] );
    }
    else if ( level.detectives == 0)
    {
        level thread ttt_endGame( "gg" , "ggggg" );
    }

}
But none of the endgame's are ever called. (Yes level.X is defined.)

Code:
        level.tratitors[level.traitors.size] = player;
Anyone got any idea why?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#2
Code:
level.onRoundEnd = ::xxxx;
level.onGameOver(end) = ::xxx;

?!? What's wrong

Edit: Try to use 'level.onDamage' ( or whatever, i will post there ) and detect his death?
EDIT2: level.onPlayerKilled
EDIT3: onDeadEvent has parameters, onDeadEvent(team).
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
Nothing worked, anyone else?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#4
I thought that we cannot edit actual GAMETYPES in COD? :S
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#5
Emulators? Anyway I think I found the issue
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#6
(04-22-2013, 07:58)G-Man Wrote: I thought that we cannot edit actual GAMETYPES in COD? :S

Reply

#7
(04-22-2013, 07:58)G-Man Wrote: I thought that we cannot edit actual GAMETYPES in COD? :S

You can create completely new gametypes..
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Making an apocalyptic themed Minecraft map AZUMIKKEL 54 29,118 08-31-2013, 02:54
Last Post: AZUMIKKEL
  [Tutorial] Custom gametype HUD iAegle 17 15,352 07-14-2013, 01:16
Last Post: Nekochan
Wink [Release] Shop system for Infected gametype Nekochan 125 76,336 07-05-2013, 18:09
Last Post: mohammadnanaa
  Making a Heli's angles match my angles? akillj 1 2,725 06-16-2013, 15:01
Last Post: Yamato
  Making a harrier crash into the map? akillj 6 4,949 06-09-2013, 05:57
Last Post: akillj
Brick Lesson 3: Making game in C++ Nekochan 2 3,567 06-03-2013, 15:25
Last Post: Nekochan
  Help Gametype WAR FaiR_PLaY 1 2,101 05-07-2013, 20:40
Last Post: DidUknowiPwn
Information [Tutorial] Making MORE glass in your form. Nekochan 27 12,389 03-22-2013, 22:04
Last Post: kokole
Rainbow Lesson 1: Making game in C++ Nekochan 6 5,253 02-04-2013, 15:27
Last Post: Nekochan
Rainbow Lesson 2: Making game in C++ Nekochan 1 2,752 02-04-2013, 15:14
Last Post: Ich1994

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.