Page 1 of 1

How should I set up Shootmania gamemode?

Posted: 22 Jan 2017, 23:47
by BigBang1112
Hello, I know it's probably a dumb question.
When I start a LAN with an empty gamemode, the map will load, but right after it it will return to menu again.
What should I add to my code to keep staying in the game? Looked into other Shootmania gamemodes, and there isn't anything special.

Hope you got me, any answers are appreciated!

Re: How should I set up Shootmania gamemode?

Posted: 23 Jan 2017, 10:44
by Dommy
I assume you don't start any mode using ModeBase (I also don't know why someone wouldn't do that). But if you want to keep the mode running, add mandatory

Code: Select all

Void CMode::RequestLoadMap()
that loads the map and

Code: Select all

while (!ServerShutdownRequested) {
    yield;
}
to keep it runnning.

Problem may be also caused by incorrect map you try to select (may feature items, but game cannot load them).

Re: How should I set up Shootmania gamemode?

Posted: 23 Jan 2017, 11:58
by BigBang1112
When you make a singleplayer gamemode, there's no need having that EndRound, StartServer etc. I also tested that and it did the same end.
The map loaded normally without RequestLoadMap(), but i tried it with too, no different result at all.
I'll try the while thing and if it won't work, I'll post a code. Thanks!

Re: How should I set up Shootmania gamemode?

Posted: 23 Jan 2017, 16:28
by BigBang1112
Oh I get it :D
Even though I forgot to put brackets after main, it didn't give me any error and it just crashed whatsoever. Now next day I ran Maniaplanet and whoop, right 2 errors. xd