
Me2
Joined: Mar 28, 2009
|
Posted: Apr 26, 2009 03:06 AM
Msg. 1 of 15
Is there a script that makes the AI follow the player? Also, when loading a Single Player via the map_name method, is there a way to choose the difficulty setting? Edited by Me2 on Apr 26, 2009 at 03:26 AM
|
|
|

sargejohnson
Joined: Apr 20, 2009
Shall we play a game?
|
Posted: Apr 26, 2009 04:02 AM
Msg. 2 of 15
|
|
|

Megaguirus
Joined: Feb 26, 2009
Om nom nom
|
Posted: Apr 26, 2009 05:30 AM
Msg. 3 of 15
1.)
(script startup ai_enhancement (ai_follow_target_players -name of encounter-) )
2.)
thats what she said -----------------------------------------^
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 26, 2009 10:00 AM
Msg. 4 of 15
You can't just set up the script and expect the AI to follow. You have to set up a series of firing positions. I'm going to attempt to explain how this works.
1) Set up groups of firing positions 2) Set the first group to A, the second to B, and so on
NOTE: This is where the AI will run to
3) Create an encounter that you want to follow 4) Create a squad. Set the actor variant, and the normal and insane difficulty. Also check automatic migration. Nothing more. 5) Create a new squad. Don't set the actor variant, or the difficulty. The only things you set, are the initial state, and the return state. Set those to whatever you prefer. Then, check automatic migration checkbox. Here's the hard part. In the attacking box, type in the letters of the firing positions that you want the AI to follow you to when attacking. If you want them to follow you from group A to group D, you would type ABCD into the box. Repeat for all the boxes. 6) Add the script 7) Compile the script 8) Compile cache file
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 26, 2009 01:39 PM
Msg. 5 of 15
Here's the explanation I made some time ago on AI following: Quote: --- Original message by: Me KS What you do is make small groups of firing positions in the areas where you want the encounter to follow the player to. Each of these groups is then set to a unique firing position group letter, e.g. the first group of firing positions set to 'A', the group nearby set to 'B', the group near 'B' set to 'C', etc. You can make up to 26 of these groups per encounter, since you have letters A-Z to work with. It's best to have the groups linearly arranged from the direction of A to Z where possible, so that it's easier to remember which is which.
Then, you make what I call "empty squads" for each letter: each of these squads has no actor type specified, as well as no spawn points, move positions, or spawn settings. All that is specified in these squads is the initial state, return state, and "automatic migration", which HAS to be checked. Automatic migration gives the encounter's actors the freedom to switch from one squad to another at will. This is what lets them follow the player, since now they can move (migrate) to the firing position group's squad that is closest to the player. Finally, the most important part is to specify the corresponding firing position group letter for each empty squad for each AI state (attacking, attacking guard, defending, etc.) You should name the squads by which firing position group they belong to, e.g. "squad_a" for the A group.
After you finish this, don't forget to create a normal squad or squads to actually spawn your actors in. In these squads, "automatic migration" has to be checked as well, and the firing position group letters should be set ONLY to the firing position group closest to the squad's spawn points.
Once all of this is done, you're ready to simply script in (ai_follow_target_players [ai]) and that's it. It should work.
So, basically, AI following is actually just automatic migrations to the squad that the player is closest to.
And finally, here are all of the AI following commands:
(ai_follow_target_disable [ai]) turns off following for an encounter
(ai_follow_target_players [ai]) sets the follow target for an encounter to be the closest player
(ai_follow_target_unit [ai] [unit]) sets the follow target for an encounter to be a specific unit
(ai_follow_target_ai [ai] [ai]) sets the follow target for an encounter to be a group of AI (encounter, squad or platoon)
(ai_follow_distance [ai] [real]) sets the distance threshold which will cause squads to migrate when following someone
Edited by Me KS on Apr 26, 2009 at 01:40 PM
|
|
|

Me2
Joined: Mar 28, 2009
|
Posted: May 3, 2009 04:15 AM
Msg. 6 of 15
I have got a small problem with the AI, they follow me just fine when I start attacking enemies but just stand still and don't follow me once I have killed all of the enemies. Anyone know how to make them follow no matter the what is happening?
|
|
|

snake2005
Joined: Jun 9, 2009
|
Posted: Jun 21, 2009 06:31 AM
Msg. 7 of 15
gamma i followed your instructions step by step but it doesnt work.. and also from you Me KS I dont know what's going wrong, i followed every step exactly, is there anything maybe a lil something what you didn't mention?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jun 21, 2009 11:22 AM
Msg. 8 of 15
Quote: --- Original message by: Me2 I have got a small problem with the AI, they follow me just fine when I start attacking enemies but just stand still and don't follow me once I have killed all of the enemies. Anyone know how to make them follow no matter the what is happening? Use (ai_magically_see_encounter [AI ENCOUNTER] [AI ENCOUNTER 2]) to make AI encounter 1 automatically try to fight AI encounter 2.
|
|
|

snake2005
Joined: Jun 9, 2009
|
Posted: Jul 8, 2009 03:33 PM
Msg. 9 of 15
got an interesting question to AI following, well I opened some single player maps and looked how the map programmers of HALO made the AI following. I saw that there were severel encounters like on "a50" of marines. According to my knowledge it's just possible to make 511 firing positions, where the AIs can follow you, but the map Truth and Reconciliation is way too big for just 511 firing positions. How did they manage all the following points for just 5 marines with severel encounters?
|
|
|

darkassassin14
Joined: Jul 23, 2007
El. Psy. Congroo.
|
Posted: Jul 8, 2009 04:22 PM
Msg. 10 of 15
they just killed them off at the command center and thrs 2 different bsp's meaning 2 sets of 511 firing positions
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 8, 2009 04:30 PM
Msg. 11 of 15
You can fit it onto the part outside the Truth and Reconciliation. The AI that are there die, as the cutscene for the grav lift plays. The marines in the cutscene are actually animated bipeds. A new encounter is spawned in the hanger. That encounter follows you as far as the command center. Then, when you come back, they're all dead.
|
|
|

darkassassin14
Joined: Jul 23, 2007
El. Psy. Congroo.
|
Posted: Jul 8, 2009 04:33 PM
Msg. 12 of 15
yea thats wat i mean
|
|
|

snake2005
Joined: Jun 9, 2009
|
Posted: Jul 9, 2009 02:54 AM
Msg. 13 of 15
yea that's true but still the way from the beginning to the gravity (below the ship) is still too long. I saw how they did it. Have a look at the encounter "initial marines" my guess is that that encounter belongs to the marines who are with you in the pelican at the beginning. Look at their firing positions. But their firing positions are just in the area where you normally have to sniper out the covenant. And then if you may have a look at the encounters "marines_area2, marines_area3" etc. their firing positions are in the next combat areas. My guess is that somehow those all encounters are in touch with each other, but how???
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 10:28 AM
Msg. 14 of 15
AI maneuvering, I believe.
|
|
|

snake2005
Joined: Jun 9, 2009
|
Posted: Jul 9, 2009 11:55 AM
Msg. 15 of 15
yea you are right, every squad has "manuver to squad_a"... But does this affect to the other encounters too? Can you explain me how to do it?
|
|
|