Author Topic: Changing Maps  (Read 1799 times)

Is there a way to change the map through script?

loadMission("[file location .mis]");

loadMission("[file location .mis]");

Alright, that seems like it will work.

Will it clean everything up before switching maps?

Alright. I did /changemap
Add-Ons/Map_Slopes/slopes.mis
, and it switched maps, but didn't load any objects.

Could this be potentially dangerous and crash the server?

changeMap("Slopes");
changeMap("Slate");

Don't listen to ZSNO's code.


changeMap("Slopes");
changeMap("Slate");

So I can type the save name of the map?

What's the command to relight the scene?

What's the command to relight the scene?
On the client, it's lightScene('',"Forcealways");
If you want to force all clients on the server to relight, you can't without client-sided coding.

crap.

Then how can I fully load/change a map via script?

Then how can I fully load/change a map via script?
changeMap("Slopes");
changeMap("Slate");

It will light correctly and clean up the mission and all of that, you don't need to worry about any of those.

It will light correctly and clean up the mission and all of that, you don't need to worry about any of those.

Odd... It did work for me.

I guess I can try again...

Ah, I figured out the problem. My Slopes map is jacked up.

Oh, and I gotta use /changemap Add-Ons/Map_(Map Name)/(Mission Name).mis

Why can't you just go cntrl-A -> changemap rather than scripting it

Why can't you just go cntrl-A -> changemap rather than scripting it
Because sometimes you need scripts that do things
For instance, try making a team deathmatch without the mod.