Creating a Single Player Mission

Scripting (5.1)

All scripting in Army Men RTS is done with standard text files, with the .cfg extention. You can make scripts in something as simple as Notepad, but it's highly recommend to use an editor like Notepad++ or Sublime. Each single player mission consists of several text files, made up of configs and scripts, that relate to and depend on each other. All together, they make up the instructions that the missions follows.

By then end of this section, you will have made a playable, scripted, single player map! Although it will be very simple, it should give you a good start into the world of scripting for AMRTS!

Note in the following sections, highlighted [ ] brackets are used to distinguish where the user inputs information. Highlighted text should not be included in your code as is.

Create a map to use with the tutorial in the previous sections. Give the map two teams, one for the player and one for the AI (use the names 'player' and 'ai').

In the player's team setup (double-click player's team name), make sure the "Default Team" button is highlighted. "Available to Players" and "Show in Debriefing" don't matter. "Requires AI" isn't necessary for human players, but if you are creating a mission where any of the units on that team will be controlled by a game script, "Requires AI" should be highlighted then. Also, give the player's team a spawn region.

In the AI team's setup, make sure the "Default Team" button is NOT highlighted. Again, the rest do not matter.

If you're not sure how to do any of the above, see Section 2.2: Teams Tool and Section 4.1: Multiplayer Map Basics.

Setting Team Relations

All created teams are neutral by default. Team relations are set using a console command. The syntax is:

team.setrelationbothway [team1] [team2] [enemy,neutral,ally]

In our case, we want the two teams to be enemies. Open the console, and enter the following command:

team.setrelationbothway player ai enemy

Then save the map.