Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
AveryMaurice

Making Hub Levels in Doom Builder 2 for ZDoom?

Recommended Posts

If anyone could supply me with a few tutorials or tips on how to create hub levels it would be great, did a few searches around but found nothing that I could implement, mostly just descriptions of what a hub level is (the ZDoom wiki).

Share this post


Link to post

MAPINFO is the key and it's simple:

// 1st map
map <MAPLUMP> <NAME>
<all your other data here>
cluster <x>

// 2nd map
map <MAPLUMP> <NAME>
<all your other data here>
cluster <x>

clusterdef <x>
hub
as you can see any map can be given a cluster definion <x> which is any number (try 1 for example)
after that, you can edit all the paremeters of your cluster definition. here in particular, we will define any maps that have cluster number <x> to be all linked together as a hub. but this only tells Zdoom to remember the state of each map when you leave it. (as long as the player is still within the map cluster)

Now, In doom builder you need to make use of this spacial and like the article says, you need extra player starts with different arg0 IDs

And do what I did, find wads that make use of hubs and learn from it. Like... Hexen or something.

Share this post


Link to post

One last quick question, how can I change the initial/starting map that is loaded when you select "newgame"?

For example, my hub is MAP00, but I keep starting on MAP01, how do I change it so I begin the game on MAP00?

Share this post


Link to post

Hmmm I'm using this in MAPINFO:

episode MAP00

map MAP00 "The Grand Corridor"
{
   levelnum = 1
   cluster = 1
}


map MAP01 "The Western Wing"
{
   levelnum = 2
   music = "BOTTHUNT"
   cluster = 1
}
but it turns up in error:
Script error, "WIP.wad:MAPINFO" line 4:
{: Unknown top level keyword
Any tips? And thanks again.

EDIT: Fixed it.

Share this post


Link to post
AveryMaurice said:

If anyone could supply me with a few tutorials or tips on how to create hub levels it would be great...

This is a step-by-step tutorial on how to create hubs.

Share this post


Link to post

Is it possible to pass acs variables from one level to the other.

Let's say I have level 01 with a variable a = 0. When i press a switch in level 02 and return in level 01, value for a is changed.

Share this post


Link to post
Lorenzo said:

Is it possible to pass acs variables from one level to the other.


global int <x>: <name>

<x> = number Id of the wariable (0-63)

Share this post


Link to post

So if in level 1 acs i write:
global int 1: a

and in level 2 acs i write:
global int 1: b

when in level 2 i change b value, it change also for variable a in level 1?

Share this post


Link to post

Global variables/arrays are meant to always retain their values (unless you change the value of course) even after entering a new level. Which is not the case with normal vars/arrays.

However, I'm not totally sure if you have to define each global var in every acs/behavior map lump or library. I think probably not. Can someone be more precise?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×