Doom-format friendly way to have more than 2 exits?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, 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.
Post Reply
User avatar
Tango
Posts: 183
Joined: Mon Jul 31, 2006 6:39 pm
Contact:

Doom-format friendly way to have more than 2 exits?

Post by Tango »

I have a map that's already pretty large and in Doom format, but I've hijacked it to be used in GZDoom nonetheless because of a paired gameplay mod. The map already has a regular exit and a secret exit, but I'm wondering if there's an easy way for me to add a third exit to the map (ie to a different secret map, for example). I of course could just switch the map to UDMF and use the features available to me there, but it would be handy to not have to convert all of the existing specials in the map if I can avoid it, given the map's size. Any help is much appreciated :D
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Doom-format friendly way to have more than 2 exits?

Post by Arctangent »

You could whip up a new line specials via a custom [wiki]map translator[/wiki], though you'll have to hardcode which map the special sends you.
Gez
 
 
Posts: 17834
Joined: Fri Jul 06, 2007 3:22 pm

Re: Doom-format friendly way to have more than 2 exits?

Post by Gez »

Well, you can always define more "hardcoded" exits through [wiki]XLAT[/wiki]. It's how it's implemented for Strife, which has a hub system in Doom format maps. You can use the line tag for the map number.
User avatar
Tango
Posts: 183
Joined: Mon Jul 31, 2006 6:39 pm
Contact:

Re: Doom-format friendly way to have more than 2 exits?

Post by Tango »

That looks perfect :D thanks so much to both of you, it is very much appreciated!

edit: In case anyone in the future who sees this is looking to do the same thing, I've attached a small demo map that demonstrates using XLAT to define a custom linedef action type that teleports to the map given by the linedef's tag, as suggested by Gez

Another quick note, for anyone that encounters the same issue I did... inside the XLAT lump, when using Teleport_NewMap as I have here in this demo, the first argument corresponds to a levelnum, as noted by the wiki. Levelnum is not, as I assumed, inferred based on the map's name (ie "map06" => 6). Rather, levelnum is a mapinfo property and can be totally separate from the map's name. So in my case I was trying to use the custom line special with a line tag of 31 to teleport me to map31, but in my wad's custom ZMAPINFO, I mistakenly set "levelnum = 1" inside the definition for my MAP31. This meant that my line special did nothing in this case, because there was no map with a levelnum of 31. This is all no surprise based on the info in the wiki, but I made some assumptions that cost me some time debugging via trial and error, so if anyone else runs into the same issue, hopefully I can save you some time!
Attachments
xlat-demo.wad
(31.79 KiB) Downloaded 76 times
Post Reply

Return to “Mapping”