A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »How do I add AI's by script?

Author Topic: How do I add AI's by script? (6 messages, Page 1 of 1)
Moderators: Dennis

AlekosGR
Joined: Aug 13, 2013

ACE Moding Team (Azura Computer Entertainment)


Posted: Dec 23, 2013 08:23 AM    Msg. 1 of 6       
I am trying to add some AI's in B40 but I don't want to add them through the regular process, like you add AI's in bloodgulch, i want the AI's to load when the game areas loads. I have tried adding them from the existing instances but they just don't work. Any help?
Edited by AlekosGR on Dec 23, 2013 at 08:24 AM


Dumb AI
Joined: Sep 18, 2011

Dead.


Posted: Dec 23, 2013 10:30 AM    Msg. 2 of 6       
Just do it the regular way, then set them not to spawn automatically.

After you set up all the encounters, add in the script commands in the appropriate places that will tell the game to spawn them.

It will probably be less of hassle and less problematic.
Edited by Dumb AI on Dec 23, 2013 at 10:32 AM


DarkHalo003
Joined: Mar 10, 2008

All ARs Need Green Little Buttons.


Posted: Dec 23, 2013 10:56 AM    Msg. 3 of 6       
I suggest looking up a tutorial on scripting and learn from there. I'd go through it step by step, but I've totally forgotten how to do a lot of it. A few years back I made this reference that contains all scripts relative to AI and then some, so I suggest looking over it if you'd like to know other things like AI using vehicles and what not. If you want AI to spawn in caves just as the player enters the cave, you'll need to use trigger volumes.

http://hce.halomaps.org/index.cfm?fid=5938


AlekosGR
Joined: Aug 13, 2013

ACE Moding Team (Azura Computer Entertainment)


Posted: Dec 23, 2013 03:11 PM    Msg. 4 of 6       
Wow... I had no idea you could do so many things with AIs... The thing is complicated, by I will give it a try :D thanks for the tutorial!


MEGA_VKNG
Joined: Dec 23, 2013


Posted: Dec 23, 2013 03:25 PM    Msg. 5 of 6       
The easiest way to do AI's is by using Actor Variants.


casual mods
Joined: May 2, 2013

I be chillin


Posted: Dec 23, 2013 05:25 PM    Msg. 6 of 6       
when i script in ai i usually just create encounters in the scenario
with not initially created checked. and i leave respawn delay at 0.

then i create a squad and i fill in actor type, initial and return state,
and set normal and insane diff to 1.
leave respawn min actors, respawn max actors, respawn total, and delay at 0.
and set some spawn points.

then heres a simple script to spawn your encounter after 10 seconds.
just delete the word encounter and write your encounter name

(script startup place_ai
(sleep 300)
(ai_place encounter)
)

if you choose to set up trigger volumes to spawn the enemies,
set up a trigger volume in an area before where the enemies spawn and use this script
it will wait until a player touches the trigger volume before spawning the encounter.

(script startup place_ai
(sleep_until volume_test_object trig_volume1 player0)
(ai_place encounter)
)
Edited by casual mods on Dec 23, 2013 at 05:31 PM
Edited by casual mods on Dec 23, 2013 at 05:34 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:11 AM 156 ms.
A Halo Maps Website