Exit Level Delay With HudMessage Animation?

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.

Exit Level Delay With HudMessage Animation?

Postby Aerosplinter » Mon Apr 05, 2021 3:04 am

Is there a way to delay the end of a level after pressing the exit switch, with a graphic animation?
User avatar
Aerosplinter
Creator of the Smash (Randomizer) Bros. Doom Mod
 
Joined: 01 Feb 2017
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)

Re: Exit Level Delay With HudMessage Animation?

Postby Cherno » Mon Apr 05, 2021 3:45 am

Of course. Make the switch run an ACS script that does whatever animation you want, and only after a delay actually exits the level.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Exit Level Delay With HudMessage Animation?

Postby Aerosplinter » Mon Apr 05, 2021 5:18 am

Cherno wrote:Of course. Make the switch run an ACS script that does whatever animation you want, and only after a delay actually exits the level.


I am wanting this to be compatible with any Doom map. Can this actually be done this way?
User avatar
Aerosplinter
Creator of the Smash (Randomizer) Bros. Doom Mod
 
Joined: 01 Feb 2017
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)

Re: Exit Level Delay With HudMessage Animation?

Postby Jarewill » Mon Apr 05, 2021 10:28 am

Not with ACS-alone as far I as am aware.
You can make an event handler in ZScript and override WorldLinePreActivated:
Spoiler:

NTMAI did it this way and I have adapted it to work on exit switches.
Next for the scripts:
Spoiler:

Finally you need a MAPINFO file with this:
Spoiler:

This doesn't stop the player from pressing [Use] again, which will skip the animation and jump straight to the next level.
There's no way to stop the player's [Use] action as far as I know, but it might be better left like this so the player can skip them.
Jarewill
 
 
 
Joined: 21 Jul 2019


Return to Scripting

Who is online

Users browsing this forum: bjork and 1 guest