Level change in ZScript?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Level change in ZScript?

Post by Matt »

I'm trying to set up a multiplayer game mode that has some endgame conditions that trigger a map change (either restarting the current map or moving to the next map).

Right now I'm calling Exit_Normal for the endgame but that doesn't work when sv_noexit is on.

I want to let the user enable sv_noexit so the players can't just hit an exit switch if they're unhappy with the way they're losing (or accidentally end the match trying to do something else near an exit line).

Is there any ZScript equivalent to Exit_Normal that can override sv_noexit?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Level change in ZScript?

Post by Graf Zahl »

If you call Exit_Normal from outside an actor's context, i.e. without an activator, these checks will be bypassed.

(ACS's ChangeLevel will also ignore these dmflags, but that looks to be a bug so don't count on it. I'm going to check this one later, it will most likely need some fixing.)

At the moment there is no direct way to exit a level from ZScript, because the action specials looked to be sufficient.
Post Reply

Return to “Scripting”