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 Technical / Map Design »AI helpers

Author Topic: AI helpers (10 messages, Page 1 of 1)
Moderators: Dennis

teknoman117
Joined: Jul 21, 2009


Posted: Sep 6, 2009 12:56 AM    Msg. 1 of 10       
Hi I'm working on a single player map. I want to have ai that helps out like in campaign. I know how to use AI and place them on a map. I know how to do command lists. I want to know how to make the AI like they are in campaign. They follow you around wherever you go and if they are in a vehicle with you, when you get out and leave, they do also. How do I make them behave like that?
Teknoman117


sargejohnson
Joined: Apr 20, 2009

Shall we play a game?


Posted: Sep 6, 2009 08:08 AM    Msg. 2 of 10       
AI following you: check the Halomaps website. There are tutorials that tell you how to do this.

AI coming into a vehicle with you: they already do. Don't believe me, create AI that use the cyborg biped and put them in a map that has hog, then you get in the hog and get near them. They should get in.
(important: make sure that the biped that the AI in your map uses has animations for getting into the vehicles that you want them to get into, like for the hog, make sure the biped has animations for getting in the passenger and gunner seat, so a campaign-ripped grunt would probably not get into your hog 'cause of this)

AI getting out: My guess is scripting. However, i am a noob in this, so maybe a scripter like Me KS or Gamma927 may be able to help you. PM them.
Edited by sargejohnson on Sep 6, 2009 at 08:10 AM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 6, 2009 10:12 AM    Msg. 3 of 10       
Bungie did a lot of complicated things to make AI follow you. The main one is to use firing position groups, and empty squads. After looking through the campaign scripts, they also made ample use of ai migration.

For entering a vehicle with you, sargejohnson is correct, they already do. You could also force AI to get in, if they don't normally, with the ai_go_to_vehicle command. However, if they don't normally get in, chances are that they don't have the animations.

To get AI to get out when you get out, do a script to wait for when the player is in the vehicle. Then, wait until the player gets out. Use the vehicle_unload command to get them out.

If you don't know how to use any of these commands, post back, or use the scripting bible, search up the command, and you'll find the syntax for it.


teknoman117
Joined: Jul 21, 2009


Posted: Sep 6, 2009 05:59 PM    Msg. 4 of 10       
On the vehicle side of this, my script:

(script continuous check_apc
(sleep_until (vehicle_test_seat_list APC "driver" (players))15)
(sleep_until (not (vehicle_test_seat_list APC "driver" (players)))15)
(sleep 300)
(if (not (vehicle_test_seat_list APC "driver" (players))) (vehicle_unload APC ""))
)


does not seem to be working. It is a continuous script, it first sleeps until some player (i do not know the unit name for master chief in single player) gets into the driver seat of the APC (The LAV25 APC off of the site) it then waits until you get out. It waits a bit (to proof getting out of a vehicle to get some ammo) then checks again. If you are still not in the seat "driver" it forces everyone out. However, it is not working. Can anyone see what is wrong?
Edited by teknoman117 on Sep 7, 2009 at 12:03 AM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 6, 2009 07:10 PM    Msg. 5 of 10       
I don't know about you, but seat labels don't always work for me. I just do "" instead of "driver" to specify all seats, to check whether the player's in the vehicle at all. And the unit name for the player in single player is (unit (list_get (players) 0))


teknoman117
Joined: Jul 21, 2009


Posted: Sep 6, 2009 10:08 PM    Msg. 6 of 10       
Is there an alias command in the scripts? Something like a #define in C? like setting a single word keyword to (unit (list_get (players) 0)) to make scripting easier?

I modified my script to not use labels as you suggested, yet it still does not work

(script continuous check_apc
(sleep_until (vehicle_test_seat_list APC "" (players))15)
(sleep_until (not (vehicle_test_seat_list APC "" (players)))15)
(if (not (vehicle_test_seat_list APC "" (players))) (vehicle_unload APC ""))
)


It can not detect me getting in or out of the vehicle

Edit: Ok I got the follow me ai to work. Follow Me KS's tutorial. A thing he left out however, you MUST set every AI squad in that encounter to guarding at guard position for initial and return states.
Edited by teknoman117 on Sep 6, 2009 at 10:42 PM
Edited by teknoman117 on Sep 7, 2009 at 12:03 AM


sargejohnson
Joined: Apr 20, 2009

Shall we play a game?


Posted: Sep 7, 2009 09:47 AM    Msg. 7 of 10       
Quote: --- Original message by: teknoman117

Is there an alias command in the scripts? Something like a #define in C? like setting a single word keyword to (unit (list_get (players) 0)) to make scripting easier?

I modified my script to not use labels as you suggested, yet it still does not work

(script continuous check_apc
(sleep_until (vehicle_test_seat_list APC "" (players))15)
(sleep_until (not (vehicle_test_seat_list APC "" (players)))15)
(if (not (vehicle_test_seat_list APC "" (players))) (vehicle_unload APC ""))
)


It can not detect me getting in or out of the vehicle

Edit: Ok I got the follow me ai to work. Follow Me KS's tutorial. A thing he left out however, you MUST set every AI squad in that encounter to guarding at guard position for initial and return states.
Edited by teknoman117 on Sep 6, 2009 at 10:42 PM
Edited by teknoman117 on Sep 7, 2009 at 12:03 AM


no wonder i couldn't get my AI to follow me, i didn't think abt this.
thx anyway.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Sep 7, 2009 09:47 AM    Msg. 8 of 10       
You could use a static unit definition.

(script static "unit" player
(unit (list_get (players) 0))
)


Just type "player" instead of (unit (list_get (players) 0))

And is this for Single Player, or Multiplayer?


Greenfuzz
Joined: Nov 18, 2008

PM me if you have CoD MW for Wii


Posted: Sep 7, 2009 12:04 PM    Msg. 9 of 10       
Ignore this post

Edited by Greenfuzz on Sep 7, 2009 at 12:06 PM


teknoman117
Joined: Jul 21, 2009


Posted: Sep 7, 2009 03:23 PM    Msg. 10 of 10       
It is for single player. I got recorded animations working so when you take over a base covenant forces deploy wraiths, ghosts, and spec-ops elites with fuel rod cannons and beam rifles. My only problem is that I can not get halo to detect me in a vehicle.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 12:38 AM 171 ms.
A Halo Maps Website