Jump to content

Random enemy and item spawn locations?


Peaved T-40

Recommended Posts

Is there a way to randomize what monsters and enemies spawn and where they spawn so that every play through is a little different? I assume this will take scripting

Share this post


Link to post

Is this on a map specifically designed for it, or is this supposed to work on any random map? It would kinda have to be specifically designed, to avoid cases of "whoops, that cluster of zombiemen became Arachnotrons and they're now all stuck together harmlessly". I think this is a case where you want to make curated lists of what can be replaced with other things, and not one big list of everything.

Share this post


Link to post

What source port are you targeting?

 

Advanced source ports have a feature where if you target multiple teleport destinations from the same teleport linedef, it'll randomly choose which to teleport to.

 

If you're targeting vanilla though, you have to manufacture the randomness yourself, using something like monster movement (put a few lines around a monster and have it be awake before you need it to teleport, then lower the lines and you won't know which it'll trigger first) or something like Floor Move Up and Down.

Share this post


Link to post
3 hours ago, Stabbey said:

Is this on a map specifically designed for it, or is this supposed to work on any random map? It would kinda have to be specifically designed, to avoid cases of "whoops, that cluster of zombiemen became Arachnotrons and they're now all stuck together harmlessly". I think this is a case where you want to make curated lists of what can be replaced with other things, and not one big list of everything.

 

Yes, it is for a specific map and what I want is a finite list of items so there are always the same number of items total and the same number of each individual item that are then randomly distributed throughout the map

Share this post


Link to post
3 hours ago, Peaved T-40 said:

 

GZDoom

 

Then yep, just tag multiple teleport destinations (either Things or Sectors, whichever you are using) with the same tag, and the teleport trigger will randomly select one (I think, anyway)

Edited by Bauul

Share this post


Link to post
3 hours ago, Bauul said:

 

Then yep, just tag multiple teleport destinations (either Things or Sectors, whichever you are using) with the same tag, and the teleport trigger will randomly select one (I think, anyway)

 

I need to look more into what can be done with teleporters. i haven't really used them in my maps so far and i'm thinking what I have in mind will likely require scripting

Share this post


Link to post
3 hours ago, RastaManGames said:

You might want to create a DECORATE-based actor of "Random Spawner" type, where you can define a something like "list" of all desired possibilities...

 

I've heard DECORATE mentioned before but I don't actually know what it is

Share this post


Link to post
7 hours ago, Peaved T-40 said:

 

I need to look more into what can be done with teleporters. i haven't really used them in my maps so far and i'm thinking what I have in mind will likely require scripting

 

If you want to randomize actual monster spawning (rather than simply what existing monsters teleport where) then yes, that's a scripting job. Randomly spawning enemies isn't the most simple thing in the world: off the top of my head I think you'd need to create an Array that defines the names for each of the monsters, and then run a random Array lookup in the Spawn Monster function to pick what to spawn.

 

6 hours ago, Peaved T-40 said:

 

I've heard DECORATE mentioned before but I don't actually know what it is

 

It's a programing language that lets you define new Things - decorations (hence the name), monsters, weapons etc. It was originally created by Raven Software for Hexen. It's good, but a little limited, so was recently superceded by ZScript, which is the most powerful programing language available to GZDoom at the moment.

 

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...