AI spawn triggers
AI spawn triggers
Does anybody know how to make a trigger that will , for example, make AI spawn around the next corner when you approach a certain place?
- Cryticfarm
- Posts: 3611
- Joined: Sat Dec 09, 2006 7:23 pm
- Location: canada
- Contact:
It's really easy. In Sapien, under Hierarchy view, go to game data and select trigger volumes.
You may have to select new instance (this is off the top of my head), then go to your ingame window thing and right click somewhere. This will place the trigger volume. You can now manipulate it's side by clicking on the sides with the left mouse button and dragging it. Now give your new trigger volume a name, let's call it myTriggerVolume for now.
Now assuming you have an AI encounter called myEncounter, make a script that looks a little something like this:
(script startup myScript
(sleep_until (volume_test_objects myTriggerVolume (players)) 5)
(ai_place myEncounter)
)
That will create your script, the 5 in there just means 'check this trigger volume every 5 halo seconds'. Don't worry about that, it should suffice.
You may have to select new instance (this is off the top of my head), then go to your ingame window thing and right click somewhere. This will place the trigger volume. You can now manipulate it's side by clicking on the sides with the left mouse button and dragging it. Now give your new trigger volume a name, let's call it myTriggerVolume for now.
Now assuming you have an AI encounter called myEncounter, make a script that looks a little something like this:
(script startup myScript
(sleep_until (volume_test_objects myTriggerVolume (players)) 5)
(ai_place myEncounter)
)
That will create your script, the 5 in there just means 'check this trigger volume every 5 halo seconds'. Don't worry about that, it should suffice.