Page 1 of 1

the needs of the many outweigh the needs of the few

Posted: Tue Jul 15, 2003 4:04 am
by williewisp
how do i get an enemy to spawn it's self, in single player, when the player does a certain thing eg, enter a buiding and some men spawn in the next room or some ether part of the map and so on????
(i know how to do an alarm. so it not that) need some help plz........ :lol:

2>..also how cud i if possible, only have a certain amount enemy's on screen(too many slow down frame rate)??????

Posted: Tue Jul 15, 2003 10:41 am
by Angex
For info about spawning enemies see here:

http://map.moh-central.net/tutorials/ai_spawning.php

As for your second question, you may need some scripting. Only spawn new enemies if the total number of enemies left is less than than 10 say. If you gave all of the enemies in certain locations the same targetname you could use:

Code: Select all

if($enemy.size < 10) {
  //spawn script
}
Theres probably a better way of doing this, but its a start.