Post: Changing gametype
10-31-2015, 06:17 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); How do I change the gametype? I thought that setting the
    g_gametype
dvar would work but not quite. When I try to change Domination into a Free For All (and do a fast restart), the scoreboard says Free For All and the typical Domination heads up display elements like the progress bar from capping a flag are gone. However, it appears to still be Domination. Anyway, the code is as follows:

    changeGametype()
{
gametype = "dm";

setDvar("g_gametype", gametype);
setDvar("ui_gametype", gametype); // Probably for Zombies only
self iprintln("^2Gametype^7 changed");
}
Last edited by BullyWiiPlaza ; 10-31-2015 at 06:22 PM.
11-02-2015, 10:17 PM #11
BullyWiiPlaza
Climbing up the ladder
Originally posted by xPlayer420 View Post
    
CGT(gt)
{
setDvar("g_gametype", gt);
map_restart(false);
}


anybody see what im doing wrong i tried changing S&Awesome face to Free For All

That's literally the same I tried, lol. The best thing I can get is the game mode name changed and hud elements accordingly but not fully change the gametype.
11-02-2015, 10:26 PM #12
xPlayer420
Bounty hunter
Originally posted by BullyWiiPlaza View Post
That's literally the same I tried, lol. The best thing I can get is the game mode name changed and hud elements accordingly but not fully change the gametype.


Same it said Free for All And it was S&Awesome face XD
11-02-2015, 10:28 PM #13
BullyWiiPlaza
Climbing up the ladder
Originally posted by xPlayer420 View Post
Same it said Free for All And it was S&Awesome face XD

I had those results too with trying to change it to hardcore. It said hardcore and looked like it but wasn't. :(
11-02-2015, 10:33 PM #14
xPlayer420
Bounty hunter
Originally posted by BullyWiiPlaza View Post
I had those results too with trying to change it to hardcore. It said hardcore and looked like it but wasn't. :(


Do you think anyone has ever worked on this before and got it to work?
11-02-2015, 10:49 PM #15
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
I had those results too with trying to change it to hardcore. It said hardcore and looked like it but wasn't. :(


try a map restart but keep the function looping
11-02-2015, 11:35 PM #16
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
try a map restart but keep the function looping

Don't all functions stop when the map restarts? It might continue if it doesn't use any endon's, huh?
Originally posted by xPlayer420 View Post
Do you think anyone has ever worked on this before and got it to work?

I didn't see it being done but I'm also pretty new to GSC modding so there might be a lot of stuff that I missed...
Last edited by BullyWiiPlaza ; 11-02-2015 at 11:38 PM.
11-02-2015, 11:57 PM #17
xPlayer420
Bounty hunter
Originally posted by BullyWiiPlaza View Post
Don't all functions stop when the map restarts? It might continue if it doesn't use any endon's, huh?

I didn't see it being done but I'm also pretty new to GSC modding so there might be a lot of stuff that I missed...


same right now im adding custom game modes to my menu.
11-03-2015, 01:44 AM #18
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
Don't all functions stop when the map restarts? It might continue if it doesn't use any endon's, huh?


Yes they might. I haven't tested it... Just a theory
11-03-2015, 02:37 AM #19
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
Yes they might. I haven't tested it... Just a theory

It came to my mind that using dvars could be helpful since they do *NOT* reset when the map is reloaded. Also we can define custom dvars for our purposes. I'll do some more testing on the weekend in terms of game mode setting/type mods and such. Winky Winky

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo