Page 1 of 1

Spawning

Posted: Wed Jan 23, 2008 6:03 pm
by woner11
Is it possible to have the AI spawn after the player spawns?

Re: Spawning

Posted: Wed Jan 23, 2008 7:30 pm
by [RDH]Zerted
Yes

Re: Spawning

Posted: Wed Jan 23, 2008 11:04 pm
by woner11
Could you tell me how?

Re: Spawning

Posted: Thu Jan 24, 2008 2:00 am
by [RDH]Zerted
There are a couple of ways to do it. Do you want the AI spawn to be delayed only for the first human spawn? If so, when your map starts to load, disable AI spawning:

Code: Select all

AllowAISpawn( ATT, false )
AllowAISpawn( DEF, false )
Only on the first human character spawn (many campaign maps do this, look at their scripts), reenable AI spawning:

Code: Select all

AllowAISpawn( ATT, true )
AllowAISpawn( DEF, true )
I should point out that a server running this map will be stuck on it until a human player joins the game.

Re: Spawning

Posted: Sun Jan 27, 2008 5:52 pm
by woner11
Does this go in my lua, and if so, where?

Re: Spawning

Posted: Sun Jan 27, 2008 6:25 pm
by Teancum
This is probably over your head to be honest. You need to understand lua scripting to do what you're wanting to do. Again, this is going back to keeping it simple.