Inside3D!
     

Random level picking

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Mapping
View previous topic :: View next topic  
Author Message
JasonX



Joined: 21 Apr 2009
Posts: 89

PostPosted: Thu Mar 25, 2010 4:10 pm    Post subject: Random level picking Reply with quote

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?
Back to top
View user's profile Send private message
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Thu Mar 25, 2010 4:33 pm    Post subject: Re: Random level picking Reply with quote

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.
Back to top
View user's profile Send private message
JasonX



Joined: 21 Apr 2009
Posts: 89

PostPosted: Sat Mar 27, 2010 12:38 pm    Post subject: Reply with quote

I searched for a while but wasn't able to find anything. Maybe some open-source mod has a similar feature?
Back to top
View user's profile Send private message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Sun Mar 28, 2010 8:20 am    Post subject: Reply with quote

I smell a func_random and a tie into QuakeC :O
Back to top
View user's profile Send private message
negke



Joined: 16 Apr 2008
Posts: 56

PostPosted: Sun Mar 28, 2010 9:27 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Sun Mar 28, 2010 10:43 pm    Post subject: Reply with quote

Hold on to this thought. Something coming before the end of the month...
_________________
<ekiM> Son, you're writing data structures your CPU can't cache.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Mapping All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group