Dr. Nick’s guide to trigger basics

By Dr.Nick
created 05/13/04

Dr Nicks Trigger Tutorial (For Newbies)

Okay, so you’ve opened up the editor and you know how to place terrain and units and you know (from playing the campaigns probably) that you should be able to do a lot more. You may have heard of triggers. You may have even read other tutorials on triggers, but were confused. Well, you’ve come to the right place. I won’t go over the more technical things; there are tutorials for that already. I won’t go over every possible trigger; There are also tutorials for that. What I attempt to do through this tutorial is explain just what a trigger is in language you can understand. So let’s begin.

Chapter 1: And Now For Something Completely Different…

Okay, first I’m going to go over something with you that you should know and that will dramatically improve your chances of understanding triggers. It is however, not really AOM related. It is English (yeah, as in the language) and logic.

I want to discuss with you sentences that start with the word IF. As in: “IF its lunch time, THEN I will eat lunch.” I know this is a rather stupid sentence, but bear with me here. Notice that there are two parts to this sentence: the cause: “IF…” and the effect: “THEN…”. This is important. Note also that the opposite is true: “IF it is NOT lunch time, THEN I will NOT eat lunch.” Are you with me so far? Good. Okay, now we can even make additions to this statement as in: “IF it is lunch time AND we have food, THEN I will eat.” Or even the other way: “IF it is lunch time, THEN I will eat AND take a nap.” Okay. Notice the key words here (you should I capitalized them). IF…THEN is a shorthand for this type of sentence. I will call it that from here on out. AND is a sort of addition. Note I can also use OR for a slightly different result, as in: “IF it is lunch time OR I am hungry, THEN I will eat.” The important part is that there are two major parts to the IF…THEN: “cause” or more appropriately, “Condition” (IF) and “Effect” (THEN). Okay, Now for the good stuff…

Chapter 2: Trigge-Who?

Okay, I’m not going to go into exactly what a trigger is, as this would be very technical. Instead I’m going to tell you what a trigger is like and what it does. Then I will describe (in general terms) how to use them. Ready? Lets go.

A trigger is like an event. That’s right. You can create events in your scenario using scenarios. An event can be anything from a unit walking somewhere, to a certain technology becoming forbidden to a certain player. There a great many events possible using triggers. This is what a trigger does.

Are you ready for what a trigger is like? It may surprise you….A trigger is LIKE Chapter 1. That’s right, it’s very easy to convert a trigger into an “IF…THEN” sentence and (more importantly) vice versa.

Okay so here’s how to use a trigger. The scenario editor comes equipped with a “trigger editor” If you open that up (You can either go to the “Trigger” menu and select “Triggers”, or by pushing the button that looks like a wheel thingy on the toolbar, your choice) you will get a window that has two sections. The one on the left is all of your triggers. The one on the right is where you can edit them. So, if this is a new scenario, you won’t have much in either window. This is because there are no triggers yet.

Chapter 3: But how do you use it?

So the first thing you need to do is create a new trigger. This can be done by pressing the “Insert” button. Now on the left you will see something like “Trigger235” or something similar. This is the name of your new trigger. There will also be some stuff on the right. Make sure that the radio button marked “Trigger” is selected. This is where you will set up your trigger’s basic type stuff. NAME is where you can give your trigger a better name then “Trigger235.” I always recommend renaming this to something more descriptive of what your trigger will do.

There is also something called “Priority” with a little scroller thingy. With this you can set how likely it is that this trigger will activate, giving it a sort of a random effect. If you set the priority to high it will pretty much always activate when its supposed to, but if you have too many High priority triggers, you will experience the mighty unstoppable force otherwise known as “Lag.”

In addition, there are some check boxes. These I will leave to your experimentation. They are pretty self explanatory. So now, you have a trigger, and it has a name and a priority. But, how do you get it to do something.

Well, remember that old “IF…THEN” thingy. The THEN part always had an action. Something was always done (“THEN I will eat.”). This is the action you want your trigger to take, so I want you to look at the left panel in the Trigger Editor window. There are three options: “Trigger”, “Condition”, and “Effect.” Does that remind you of anything? Here’s a refresher: “IF” can also be called the “Cause” or, more appropriately the ”Condition”, “THEN” can also be called the ”Effect”. It should all be starting to come into place now. The option (“Trigger”, “Condition”, and “Effect”) that you select will change the right-hand portion of the Trigger Editor into the appropriate action. In other words, if you select “Condition” it will change into a place where you can select your condition (your “IF”) you can also add more than one “Condition” and the effect is the same as “AND” in the “IF…THEN” sentence. You may notice you can also change this to “OR” for the desired result. There is also a place to check “NOT”. It all makes sense now doesn’t it?

Chapter 4: Conclusion

Okay, so now you have a basic Idea of what a trigger is and how to use it. Remember that a trigger has two basic parts: “Conditions” and “Effects” if you use these terms when asking questions on the forums, other formers can understand you better. As in: “I have a question about this Condition.” Instead of “I have a question about this trigger.” Also, I recommend reading the other tutorial guide in the AOMH Design Library. It should make a lot more sense now.