Forum

> > CS2D > Scripts > Default "GunGame.lua" Script and MapChange Bug?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Default "GunGame.lua" Script and MapChange Bug?

4 replies
To the start Previous 1 Next To the start

moved Default "GunGame.lua" Script and MapChange Bug?

RichNagel
User Off Offline

Quote
I've noticed a problem that whenever I'm running the default "GunGame.lua" that comes with the game, the map never seems to change (even though I have a valid "MapCycle.cfg" file, and "mp_timelimit 10" set in the game).

I'm also using the default "Advertise.lua" and "UTSFX.lua" scripts (along with the "GunGame.lua" script), so I'm not really sure if it's related to those.

I also tried "mp_winlimit 1" and "mp_roundlimit 1" (instead of "mp_timelimit"), but had the same problem... the map never cycles.

Lastly, I tried it using the dedicated server (I start the server, and then join my server within the game)... same problem.

BTW, one thing that I did notice:

If the "mp_timelimit" is set to something really low (such as 2), which of course wouldn't give the players enough time to actually win the default gungame, THEN the map will cycle. This makes me think that maybe the "GunGame.lua" does some sort of reseting when a player wins, which somehow resets or "confuses" the "mp_timelimit" setting.

Is this a known bug with the default "GunGame.lua", or am I doing something wrong?

Thanks in advance for any help


(Edit) Anyone?

@DC, Is this a known problem with the gungame script?
edited 1×, last 19.12.12 11:38:07 am

old Re: Default "GunGame.lua" Script and MapChange Bug?

EngiN33R
Moderator Off Offline

Quote
Firstly, please do not push your threads. We will see them and respond.

The sample gun game script sets the gamemode to 1 (deathmatch), which does not have a time limit. I believe this answers your question.

old Re: Default "GunGame.lua" Script and MapChange Bug?

DC
Admin Off Offline

Quote
cs2d cmd mp_timelimit is supposed to work in this scenario. It must be some kind of bug if it doesn't behave normally.

cs2d cmd mp_winlimit and cs2d cmd mp_roundlimit can't work in this scenario because cs2d cmd sv_gamemode is set to 1 (deathmatch). The deathmatch game mode does not have rounds and no team wins (yes, win limit only counts for team wins, not for individual player scores). So neither a round limit nor a win limit can be reached at all.

old Re: Default "GunGame.lua" Script and MapChange Bug?

RichNagel
User Off Offline

Quote
user DC has written
cs2d cmd mp_winlimit and cs2d cmd mp_roundlimit can't work in this scenario because cs2d cmd sv_gamemode is set to 1 (deathmatch). The deathmatch game mode does not have rounds and no team wins (yes, win limit only counts for team wins, not for individual player scores). So neither a round limit nor a win limit can be reached at all.


Yeah, I had a hunch that those wouldn't work, as you explained above.


user DC has written
cs2d cmd mp_timelimit is supposed to work in this scenario. It must be some kind of bug if it doesn't behave normally.


Thanks for the info, DC I'm thinking that it must be a bug (either in CS2D itself, or in the "GunGame.lua" script), as the map never cycles... unless that the "mp_timelimit" is set so low that a player doesn't have time to win.


(Edit): A small question.

I see in the "GunGame.lua":

1
2
3
if (sample.gg.level[id]>=#sample.gg.wpn) then
	msg("©000255000"..player(id,"name").." has won the game!@C")
	parse("restart")

When you issue a "restart" (which according to the CS2D help web page is the same as "restartround", "sv_restart", and "sv_restartround"), does the game ALSO start counting down the "mp_timelimit" again from it's *original* set value?

If so, that would explain this behavior.
edited 1×, last 19.12.12 06:20:17 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview