How should I set up Shootmania gamemode?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
BigBang1112
Posts: 388
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

How should I set up Shootmania gamemode?

Post 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!
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
User avatar
Dommy
Translator
Translator
Posts: 1866
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: How should I set up Shootmania gamemode?

Post 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).
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
BigBang1112
Posts: 388
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: How should I set up Shootmania gamemode?

Post 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!
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
User avatar
BigBang1112
Posts: 388
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: How should I set up Shootmania gamemode?

Post 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
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest