Forum

Random level picking

Discuss the construction of maps and the tools to create maps for 3D games.

Moderator: InsideQC Admins

Random level picking

Postby JasonX » Thu Mar 25, 2010 4:10 pm

Hey guys,

I would like to know how to create an map entity that randomly sends the player to another map from a list. For example, the button. If the player shoots at it or gets close to it, he will be transported to another level.

I would make a list of levels (e1m1, e1m2, etc.) and the game would choose from those randomly, each time that button is activated in any map.

Is it too difficult?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Re: Random level picking

Postby Teiman » Thu Mar 25, 2010 4:33 pm

JasonX wrote:Hey guys,

I would like to know how to create an map entity that randomly sends the player to another map from a list. For example, the button. If the player shoots at it or gets close to it, he will be transported to another level.

I would make a list of levels (e1m1, e1m2, etc.) and the game would choose from those randomly, each time that button is activated in any map.

Is it too difficult?


Nah, is very doable, methinks.

You could star reading the tutorial to make "hub levels". Has to be somewhere.

You could just make a "mission_end" or whatever is called the clip that trigger a end mission and map change, to load some hardcoded different maps. But that would be lame.
A better idea would be to have some invisible entities (that have a empty spawn function in the progs.dat) with the names of potential new maps in "netname", and let that "mission_end_random" entitie pick one of these entities at random and use his netname has the name for the next map to load.

There could be even better ways to do it, maybe even code that already do that.
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby JasonX » Sat Mar 27, 2010 12:38 pm

I searched for a while but wasn't able to find anything. Maybe some open-source mod has a similar feature?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby r00k » Sun Mar 28, 2010 8:20 am

I smell a func_random and a tie into QuakeC :O
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby negke » Sun Mar 28, 2010 9:27 am

Are you looking for a QC solution or a way to do with id1 progs? The latter is possible with logic gates and hacks, but it's a complicated setup. Adding randomize code to an existing (or new) entity is much cleaner and easier.
negke
 
Posts: 150
Joined: Wed Apr 16, 2008 5:53 pm

Postby Lardarse » Sun Mar 28, 2010 10:43 pm

Hold on to this thought. Something coming before the end of the month...
Roaming status: Testing and documentation
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest