
tylerp14
Joined: Oct 12, 2010
Ohai der...
|
Posted: Feb 17, 2011 03:57 PM
Msg. 1 of 8
So I want to make a Single Player map, I know how to do AI In-game and they spawn and all that when I step into the trigger volume, I know how to do hud-messages as well. I want to know how to do waves and nav points. Oh and when I type in "(ai_follow_target_players encounter_2)" in the script they dont follow me, they just stand there, when I do "move locations" for the encounter they move, but they still dont follow me, they do get in my vehicle when I go up to them, and do they have to be on human teams? I have them on player teams because when I put them on the human team they attack me.
Thanks if you can help. Edited by tylerp14 on Feb 17, 2011 at 05:17 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Feb 17, 2011 04:44 PM
Msg. 2 of 8
People tend to bold text to emphasize a certain point. When you bold the whole post, it does nothing more than scream for attention, making me not want to devote any attention to it at all. Just a heads up. Putting this aside, Quote: --- Original message by: Gamma927 It's not something newbies usually try out, mainly because of the large potential for error. However, I will translate (cuz I'm nice like that)
1) Create an AI encounter, and set up firing positions in groups (how?) a) Before I proceed, I'll explain what I mean by "groups". Each group is an area where the AI would fight in given the player's proximity. For instance, if you have a series of rooms, and you make each room have a separate group of firing positions, the AI would fight in each room. Let's say the player's in room 1. Thus, the AI would only use the firing positions within room 1. When the player moves to room 2, the AI will use the firing positions in room 2. If you don't understand this, that's not too much of a problem. Just put firing positions down in groups. How? b) To put firing positions down in groups, in the properties pane, there will be a dropdown box to specify a certain letter. Each letter represents a certain group. If you place half the firing positions down with A (red), and half with B (blue), then they'll choose between groups whenever convenient. Remember to keep the A firing positions grouped together, and the B firing positions in a separate group.
2) Create one squad (only one). Specify the actor variant, the difficulty, etc. Check automatic migration. 3) Create a new squad. For this squad, do NOT specify the actor variant or difficulty. Instead, the only things you do are to check automatic migration and follow the directions below. 4) In the attacking, defending boxes, put in the letter of a firing position group (for example, A for firing position group A) 5) Repeat for all firing position groups. 6) Use the ai_follow_target_players command in a script.
That should be it.
Quote: --- Original message by: Gamma927 If you wish to attach a nav point to an object, (a biped or vehicle, for instance), you'd need to use:
(activate_team_nav_point_object "navpoint type" "team" "object" "vertical offset")
For "navpoint type", replace it with the type of navpoint you want. I don't really remember all of them; in fact, the only one you probably need is "default". That's the default blue arrow used throughout the campaign.
For "team", this is the team that sees the nav point. Obviously, you want the player to see the nav point, and thus, you use "player". If this is a multiplayer map, teams are done differently, and the player team is blue team (afaik, iirc). I'll check tomorrow.
The "object" is the object you wish to attach the nav point to. Just substitute it with the name of the object you want (this can be specified in the properties pane when you select the object in hierarchy view).
The "vertical offset" is how high above the object you want the nav point to appear. If you're all out of ideas, 0.6 is a good number.
So, an example of this, using object1 as the name of the object, would be:
(activate_team_nav_point_object default player object1 0.6)
This activates the nav point. Whenever you wish to deactivate it, you'd use something similar, basically:
(deactivate_team_nav_point_object "team" "object")
"Team" and "object" are the same ones you used for the activate command.
If you wish to attach this to a flag rather than an object (flags are placed in hierarchy view; mission > game data > flags), then use
(activate_team_nav_point_flag "navpoint type" "team" "flag" "vertical offset")
and deactivating it would be: (deactivate_team_nav_point_flag "team" "flag")
Now, you probably want to make these nav points appear once you go through a trigger volume, or when something happens. Basically, you'd use a "conditional" phrase before the activate / deactivate commands. A conditional phrase is basically a command that checks whether a condition is true or false. Slightly confusing, but for now, we won't go too far into it.
Let's say you want to use a trigger volume to activate the nav point. Here, the trigger volume would be the conditional, because that's what checks whether something is true or not (whether the player is in the trigger volume)
An example of this script would be:
(sleep_until (volume_test_objects triggervolume (players)) 15) (activate_team_nav_point_object default player object1 0.6)
Not too difficult, I hope. As I said, I'll check back tomorrow if you have any questions.
AI also enter allied vehicles by default. Here's how to set the marines on the human team correctly. Quote: --- Original message by: Gamma927 Before you can comprehend what an allegiance does, you must learn what a team is. The team of an unit or an AI encounter is the team that the unit / encounter is affiliated with. For example, the player is always on team 1: player, and it is common practice to set marines to team 2: human and covenant to team 3: covenant. Note that this is for single player only; in multiplayer, red team is team 0 and blue team is team 1.
Now, in single player, you'll often times have enemy teams. If you choose to make certain teams band together and help each other, you use the ai_allegiance command. The player and the human teams are NOT automatically allied; in order to create an allegiance between the two teams, you must script it separately. Example:
(ai_allegiance player human)
This will create a bond between the player and human teams, with both cooperating as per the campaign. It will also inherit the trait in that if the player betrays the human teams (teamkilling marines as I'm sure many of you have done :V), the allegiance will break, and the marines will become the player's enemies (I'm sure you've also witnessed this).
In addition to creating allegiances, you can also break allegiances. For instance, if you have sentinel allies and an allegiance between the player team and the sentinels team, and you choose to break their allegiance as per the campaign, you can use the ai_allegiance_remove command. The syntax is similar to the allegiance command. Example:
(ai_allegiance_remove player sentinel)
This will effectively break the bond between the two teams.
Edited by Gamma927 on Feb 17, 2011 at 04:45 PM
|
|
|

Xoronatus
Joined: Dec 6, 2010
Taking a break
|
Posted: Feb 17, 2011 09:52 PM
Msg. 3 of 8
Quote: --- Original message by: tylerp14
So I want to make a Single Player map, I know how to do AI In-game and they spawn and all that when I step into the trigger volume, I know how to do hud-messages as well. I want to know how to do waves and nav points. Oh and when I type in "(ai_follow_target_players encounter_2)" in the script they dont follow me, they just stand there, when I do "move locations" for the encounter they move, but they still dont follow me, they do get in my vehicle when I go up to them, and do they have to be on human teams? I have them on player teams because when I put them on the human team they attack me.
Thanks if you can help. Edited by tylerp14 on Feb 17, 2011 at 05:17 PM Try ai_magically_see_players (encounter) so if my encounter was called enc_1 the command would be ai_magically_see_players enc_1 That's what I use, and it works like a charm.
|
|
|

tylerp14
Joined: Oct 12, 2010
Ohai der...
|
Posted: Feb 18, 2011 02:40 AM
Msg. 4 of 8
I still need to learn how to do waves. Can somebody help?
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Feb 18, 2011 03:49 AM
Msg. 5 of 8
First, make sure every wave is a separate encounter. Now make a script like:
(script continuous {script name} (sleep {time until game starts}) (ai_place wave1) (sleep_until (= (ai_living_count wave1) 0)) (sleep {time until next wave}) (ai_place wave2) (sleep_until (= (ai_living_count wave2) 0))
Repeat for every wave in your scenario.
That script might need a little editing, but that is basically what you need. I have never done a wave script before so some of the commands/syntax might be wrong or less efficient.
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Feb 18, 2011 03:57 AM
Msg. 6 of 8
Yes but you could split the script into two, so that waves 1 through 5 are in one and 6 through 10 are in the other, so once 5 is finished the second script will start, and once 10 is finished it will start the first over again.
Also, I started my reply before you finished posting yours, lol.(Yes it took me over ten minuets to type that)
I never knew that that you already posted a script. Edited by rerout343 on Feb 18, 2011 at 03:59 AM
|
|
|

tylerp14
Joined: Oct 12, 2010
Ohai der...
|
Posted: Feb 18, 2011 01:55 PM
Msg. 7 of 8
Ok, i'm not getting it, still need help... Add me on Xfire: tylerp14 or PM me please.
Whats wave1, wave2 etc supposed to be? Trigger Volume? AI Encounter? Edited by tylerp14 on Feb 18, 2011 at 01:58 PM
|
|
|

rerout343
Joined: Aug 7, 2010
Targeted and Firing
|
Posted: Feb 18, 2011 03:38 PM
Msg. 8 of 8
|
|
|
| |
|
|
 |
|