dim3 Forum

Full Version: Random Enemy Generator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

KingAlfonso

hey it it possible to have a random enemy generator that constantly generates enemies?
and if its possible how do u do this?
Make a spot and have it spawn it object over and over? Brian I'm not sure you can do that. Spots are one-time ,aren't they? Maybe you should have a spot script (optional) which you can tell it to spawn an object and use so and so script, etc, etc. Or just build the optino into the core.
Actually I think the way to do this would be to have a set of already existing mosters, but every time one of them is killed it's put into a que and can be caused to re-start itself at the generator.
Ah, but it would have to be a random timer Durandalski, AND it would spawn in the same place every time.
Durandalski is right. Scruffy does that in a number of places. The steps are:

1) Create a portal somewhere off the map. Put in a number of monsters, and name them uniquely so you can find them in scripts (like Monster1, Monster2, etc)

2) Put some random wait in the course script. When it fires, create the next random wait

3) In the wait fire, take a monster that's not being used (you can keep an array in the course script of the ones you've pulled out and the ones that have gone back in from dying), and send it a message

4) When the bot catches the message, it moves itself to a random spot in the map (there's a API to do this.)

This is not the easiest script to do, it's probably 20-30 lines in a couple scripts and takes message passing. Start easy on it, just do the part the moves the monsters around, then slowly build on it.

[>] Brian
hmmm... i geuss this would work, cause if you DON'T kill a zombie it will kill you :D.
right?
Reference URL's