What's wrong with my hub?

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
DavidN
 
 
Posts: 266
Joined: Mon Dec 28, 2015 6:22 pm

What's wrong with my hub?

Post by DavidN »

I'm experimenting with an idea for a hub-based game but I'm having trouble getting off the ground despite the usual tutorials! Here's what I have so far:

http://teamouse.net/games/doom/hubexperiment.pk3

Image

This PK3 contains a pair of maps, FRAG1001 and FRAG1002, which are meant to be connected together - they have two exits each, on the east (1001) and west (1002) sides, currently represented by big FIREBLU walls which you can touch to teleport.

When pressed, each of these walls calls action 74 to teleport the player to a playerstart in the other map. The playerstart tag (TID) is 0 for the exits nearer the south, 1 for those nearer the north.

MAPINFO numbers FRAG1001 as levelnum 1, FRAG1002 as levelnum 2, both in cluster 1 which is designated as a hub. The default map definition sets "RandomPlayerStarts" so that voodoo dolls are not generated at each playerstart.

The expectation: Pressing on the FIREBLU walls will teleport you to the other map in the correct place (upstairs/South, or downstairs/North). You can travel between them and the maps will keep their state.

The result: When you press on a wall, you teleport to a random playerstart on the other map, except for the occasional surprise where it'll say "No playerstart to move to" and just crash instead.

Can anyone help identify what I'm missing? Thanks!
User avatar
DavidN
 
 
Posts: 266
Joined: Mon Dec 28, 2015 6:22 pm

Re: What's wrong with my hub?

Post by DavidN »

Extra note - I suddenly realized that tag 0 is not the first tag in Doom but instead means "no tag" - so I've replaced tag 0 with 2 and now absolutely no exits work at all - no playerstart can be found on the other map!
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: What's wrong with my hub?

Post by MFG38 »

The mistake you're making is that you're putting the custom values in the wrong place. The "position" that the Teleport_NewMap function (among other things) refers to is not a tag that you give to the player start things, but rather, it's argument 1 of said things, which would otherwise be unused.

I spent the better part of an hour figuring this out just so I could help you - learned something myself in the process. :D In any case, I've attached the fixed .pk3 here for you to look into.
Attachments
hubexperiment.pk3
(9.2 KiB) Downloaded 63 times
User avatar
DavidN
 
 
Posts: 266
Joined: Mon Dec 28, 2015 6:22 pm

Re: What's wrong with my hub?

Post by DavidN »

Aaaaaagh! Thank you so much - I had been baffled as to what an “arg0” was in the context of a player start, and had completely passed over that section of the thing dialogue because of it being greyed out. It only occurs to me now that things must be able to have arguments for dynamic light colours and so on. I’m not sure how my wrong method managed to crash GZDoom quite so badly, but this definitely works consistently now - thanks for spending time on it!
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: What's wrong with my hub?

Post by MFG38 »

Glad I could help. c:
Post Reply

Return to “Mapping”