AI Respawn

This if for tutorials and information for the community to use for great works.
Keep them organized now!..
Post Reply
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

AI Respawn

Post by Grimdoomer »

In this tutorial you will learn how to add AI to a map PLUSE how to make them respawn.

Programe's needed:
H2 Core and H2 Guerilla
Entity Preferably Entity 1.3.9

Mics:
A Multiplayer map of your choice.
A Single player map of your choice.

Note: you must decompile your Single player map first otherwise you will have corrupted models or sounds.

Step 1) Open up your SP map in H2 Core and goto the scenario of the map. Then goto Map -> Decompile Map.
Image
Step 2) It should take 10-20 minutes to decompile, After do the same with you MP map, it should take from 3-5 minutes.

Step 3) In H2 Guerilla Open the scenario of the single player map and the Multiplayer map, by going to C:\H2\scenarios\multi\marathon\foundation.
Image
Step 4) In your SP scenario find a chunk called vehicle pallet. Click copy all, then a message should pop up saying chunks copyed.
Image
Step 5) Now in your MP map goto the vehicle Pallet, and click Insert.
Image
Step 6) Now do exactly the same for weapons pallet, biped pallet, AI squad types, AI squads, and Characters.
Image
Step 7) Goto the AI squds chunk and click the pluse sign. Then use the drop down box(blue) to find squds you want. Get Squads with the highest number of AI spawned on MP(green), Or get what ever one's you want and write down the name(red).
Image

Step 8 ) Now goto File -> Save, then goto Editor's -> Script Tools.

Step 9) Hit Add New Script, then you should see this:
Image
Step 10) Now enter the script below with the squad name that you wrote down befor.

Code: Select all

(script continuous YourSquadName 
  (begin 
   (sleep_until (<= (ai_living_count yoursquadname) 0) 450) 
   (ai_place yoursquadname) 
  ) 
)
Now the 0 after AI living count is how many AI are left when the respawner kicks in. so if you have 10 AI spawned and you want it to respawn them when there are only 2 left you would put in two. The 450 is the time to wait befor they respawn. 450 halo time units is about 30 secounds.

Step 11) After you have put your squad name where it says to hit compile. If you did it right then a message should pop up saying complication succsesfull. If not then you did something wrong or you missed a step.
Image

Step 12) If you have more than one squad repeat Steps 9-12 if not then goto File -> Save. Then close out of H2 Guerilla.

Step 13) Open your .map file of your MP map in H2 Core and go to Map -> Rebuild. Then click the ... button and brows to your scenario - C:\H2\Scenarios\Multi\Something\YourMap.scenario. Then check "Keep Existing Spawns", then rebuild.
Image
Note this could take any where from 3 minuts to an hour depending on you computer. I recomend exiting AIM and any other applications. Once Done you can change settings for your AI squads then just change the folowing drop down box to the script that corrosponds with your squad. Then you are done!!!
Image
That is at the bottom of the AI squds chunk in entitys meta editor.
Don't snort the magic, we need it for the network.
Post Reply