Post: Forcing match end with custom text and custom winner
12-03-2015, 02:58 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I need this for an edit of the You must login or register to view this content.. The function used for ending the game is
    maps/mp/gametypes/_globallogic::forceend();

However, it doesn't end the entire match, just the round. Also, it doesn't allow you set a custom winner message and it makes the highest scoring team/player the winner and NOT the one who used the nuke.

I found a better function which is the following:
    maps/mp/gametypes/_globallogic::endGame(self, "Tactical Nuke");

The first parameter is the winner and the second one the custom message text. Sounds good so far. However, when this is used, the winner is still determined normally and it does NOT override the game's normal way of determining the winner (highest score). The custom message text works as expected. Again, it only ends the round.

So how to do it exactly like in MW2? I don't want ties or losses but a win no matter what when this mod is used and the match to end instead of the round.
(adsbygoogle = window.adsbygoogle || []).push({});
12-03-2015, 04:23 AM #2
I have faced similair issues with an update for my gamemode i have been working on.

    level thread maps/mp/gametypes/_globallogic::endgame("tie", "^1Tactical Nuke");


Is the best you're gonna get. You can't override the way it display in what order players who have the highest score.
I don't know if you can remove that part either it just does it by default.

Also what gamemode is this for since you say "rounds".

In my gamemode i wanted it to display the last person alive, so if this helps:

    Makesureyoucallforallplayers()
{
foreach(player in level.players)
{
player WinnerMonitor();
}
}


WinnerMonitor()
{
self endon("disconnect");

for(;Winky Winky
{
if(level.playersalive <= 1)
{
self thread WinnerName();
}
wait 1;
level thread maps/mp/gametypes/_globallogic::endgame("tie", "The Winner Is:" + level.winnername);
wait 0.05;
}
}

WinnerName()
{
if(isAlive(self))
{
level.winnername = self.name;
}
}

The following user thanked OfficialCoolJay for this useful post:

BullyWiiPlaza
12-03-2015, 12:38 PM #3
BullyWiiPlaza
Climbing up the ladder
Okay, I'm going with the following I guess Smile
    level thread maps/mp/gametypes/_globallogic::endGame("tie", "Winner: " + self.name);
12-03-2015, 05:06 PM #4
use this nuke one its better than that one You must login or register to view this content.
12-03-2015, 06:34 PM #5
BullyWiiPlaza
Climbing up the ladder
Originally posted by ZeTwistt View Post
use this nuke one its better than that one You must login or register to view this content.

Same code kiddo xD
12-03-2015, 07:31 PM #6
No its not

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo