Ugh.. I had this all typed out and my comp froze, THEN SEN wasn't letting me post but here it is finally...
AI Scripting was probably my first big step in mapmaking as a newb, learning to "unstupidize" the computer.
Okay, a lot of this is the same/similar to what Fwop_ said, I think I put
every step needed to making the trigger
(This is all based on StarEdit's program which is the same as StarEdit X-Tra for these steps I believe, I wasn't sure which you were using)
Before Making The Trigger:Alright, first you might wanna learn what each AI Script does. StarEdit has a help window for this and you can access it by going to "Help" on the top bar and selecting "Starcraft Campaign Editor Help" In the 'Contents' tab, Open up "Using Triggers" and Display "Triggers: AI Scripts"
You can also refer to StarEdit Network's Tutorial below:
http://www.staredit.net/index.php?tutorial=22Okay, once you familiarized yourself with the various AI Scripts, it is time to make the trigger
Making The TriggerDepending on how much of an advantage you want the Computer to have over you, you can give the Computer more buildings and units to start off with in their base. Once you have finished making your Computer's base, do the following:
1.) Click on the ["...." Layer] Dropdown Box and select the [Location Layer] box
2.) Using your cursor, click and drag a box that encompasses the entire Computer's Base. After releasing a blue box should appear called "Location #"
3.) Now click on "Scenario" on the top window bar and click "Triggers..." A window should appear labelled "Triggers"
4.) In the Triggers Window, click [New...] This should cause a "Players" Window to appear
5.) In the Player Window, click the box of the Computer Player and press [Next >] and a "Conditions" Window should appear
6.) In the Conditions Window, press [New...] and a "New Condition" Window should appear
7.) In the New Condition Window, click on the dropdown menu, select "ALWAYS" and press [OK]
8.) You should now be back on the Conditions Window with a checked "Always." now press [Next >] An "Actions" Window should appear
9.) In the Actions Window, click on [New...] and a "New Action" Window should appear
10.) In the New Action Window, click on the dropdown menu, select "RUN AI SCRIPT AT LOCATION" and a sentence with blue links should appear in the New Action Window
11.) In the New Action Window, click
'script' choose your desired AI Script from the dropdown menu, and press [OK]
12.) From the New Action Window, click
'location' and in the dropdown menu, choose the location name that you made for your Computer's base and press [OK]
13.) From the New Action Window, click [OK] and press [Finish] in the Actions Window.
14.) In the Triggers Window you should now see a trigger for the Computer similar to the trigger below:
| Trigger |
| Players: |
| ¤ Player # (This Should Be The Computer Player) |
| Conditions: |
| ¤ Always. |
| Actions: |
| ¤ Execute AI script 'Your Selected AI Script' at 'Location #' |
Hope this helps!
