Personally, I don't use return values in my actions.
The Return Type section is used when you want to return something.You don't really need to worry about this for the moment. The Options section will let you set options for your actions.So what do these little added areas at the top do? Well. This will bring up a panel on the right that looks remarkably similar to the trigger panel! The only difference is the presence of 6 little sections at the top. For you editor pros, they hotkey is control + alt + R. But how do I make one?Īction definitions are very easy to make- just right click in the trigger list on the left side of the editor, and choose new > action definition. I'll give you some actual examples later in the tutorial. This gives you a lot of flexibility and control over how you structure your triggers. You can also add parameters to your action, just like the built-in actions. Now, we can just turn on or off the AI with 1 line. Instead, we created an action that does it for us. Imagine if we had to use all 86 lines of that every time we wanted to turn the AI on or off for a certain player. To start up our AI, we use about 86 lines of triggers. Let's take the map RuneCraft (you know, the really amazing one that you should totally go and play).
But if you create your own action, you can use it in all your triggers, just like any built-in action. Blizzard has already provided us with tons of actions- things like set variable, create unit, create dialog, or save bank are all pre-made actions. So what is an action definition? An action definition is when define (aka create) an action. Action defenitions will save you a lot of time (and effort!) once you learn them, and as you get better, they will completely change the way you build triggers. But then you hear of a mystical object called an "Action Definition", and curiously look up this tutorial. You're feeling pretty good about your triggering skills. For this, you must have the Sub-functions flag checked in ‘Function Options.’Ĭreates a Global variable in the Triggers Panel or a Local Variable in the Trigger Content Panel depending on cursor position.So you've got a decent grasp of events, conditions, and actions.
Toggles the Trigger Content Panel Subview on or off.Ĭreates a new element of the type that is currently selected.Ĭreates a comment at the current cursor location.Ĭreates an event in the Trigger Content Panel.Ĭreates a condition in the Trigger Content Panel.Ĭreates an action in the Trigger Content Panel.Ĭreates a condition definition in the Triggers Panel.Ĭreates an action definition in the Triggers Panel.Ĭreates a function in the Triggers Panel.Ĭreates a parameter in an active definition within the Trigger Content Panel.Ĭreates a value in an active preset within the Trigger Content Panel.Ĭreates a sub-function in a currently active function within the Trigger Content Panel. Reverts commands forwards through the Trigger Editor history.Ĭhanges the view from plain-language to raw script identifiers and Galaxy function calls. Reverts commands backward through the Trigger Editor history.
Below you’ll find a table thatīreaks down the options available from the Trigger Bar. All of the Trigger Editor’s viewing and creation options are madeĪvailable here for your convenience.