Creating a Sample Trigger

From HIVE
Revision as of 02:13, 25 December 2012 by MarkOfCain (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

By right clicking the area on the left, some options will appear, such as making a new trigger or variable. These are the two basic things you need to know about when it comes to triggers.

Start by making a new trigger by right clicking, going to New, and then New Trigger. You could also push CTRL + T to achieve the same thing. To name your trigger, right click the new trigger in the area on the left, then viewing its properties (Element Properties, or CTRL + Enter is the hotkey).

Now that the trigger has been made, you'll need an event to trigger this trigger. Try a simple event first, such as a key stroke. Right click the top right area of the window, then go to New, and then New Event (or CTRL + E). Double click on Key Pressed, and the event will appear under your events. In the bottom right area, both in the white space and grey area your event will appear. Choose your fields wisely, such as the key to trigger the trigger, and the player that can trigger the event. Use the allow function for any of the other keys to make unique hotkeys in game, such as ALT + G to make a grenade ability. For now we'll do something simple to just make a functioning trigger.

Now we need an action. Conditions are optional, but most times needed to make a functioning trigger. For this we wont need one. Right click the top right area again, go to New, then New Action (or CTRL + R). Type 'Text Message' into the find box at the top, then double click on 'Text Message'. Now input data into the fields, such as All players for the player input section to make the trigger display the text message to all players. Next make it say something informative, such as "Key combination has been pressed.", and then choose an area where to display the text. If you wish to mimic SC1's text style, choose 'Debug'.

When finished it should look something like this:

Key Stroke.jpg


Now enter StarCraft II and test your new trigger, and ensure it does only what you want it to do.