C-GEN - Cannis Games Editing Network  
   
  
   
   
 
     
 
   
 

RA2/YR: Attaching Multiple Triggers to the Same Object
by CannisRabidus. Published: 1/1/03. Last update: 9/6/03.

Most experienced mapmakers know how to attach triggers to objects (or teams) on their map. A problem develops when one wants the same object to be considered for the events of 2 or more triggers. How does one attach a trigger to an object that already has a trigger attached to it? This short tutorial will tell you how to do it.

The thing you must understand is that you do not actually attach a trigger to an object. What you are really doing is attaching that trigger's tag. So what you need is a common tag for all triggers involved. Let's consider an example where you want to attach 2 triggers to the same building.

Make both triggers, and call them TRIG1 and TRIG2. Now edit TRIG1: in the "attached trigger" field (you thought you would never use this, right?), select TRIG2. Now TRIG2 is attached to TRIG1, so TRIG2 doesn't need a tag anymore -- because it can use TRIG1's tag instead! At this point, open into the Tag Editor and find TRIG2's tag, and delete it. It is no longer needed and its presence would just confuse things. You want to force TRIG2 to use TRIG1's tag.

Double-check TRIG1 in the trigger editor and make sure it is set to Type2 (repeating). You must do this or your multiple trigger arrangement will not work properly. This is because tags can be repeating or not -- not triggers. If the tag was not flagged as a repeating tag, then when the first trigger fires the tag gets "used up", and the second trigger would never fire. After you set TRIG1 to be repeating, you can check TRIG2 and you will see it has automagically become a Type2 trigger as well.

Now double-click on your building, and attach TRIG1's tag to it. Both triggers are now attached to the same building!

 
   
 
 
     
 
 
All content, files, images, etc., appearing on this website and all hosted websites, are copyright © 2002-2006 by Cannis Games Editing Network (C-GEN),
and/or if applicable, by the Owner(s) of said hosted website(s), and/or in the case of submitted material, by the Author(s) of that material.
No reproduction of any of the above is permitted for any reason unless express permission is given by the applicable Owner(s) and/or Author(s).
All trademarks appearing on this website are, and remain, the property of their respective owners.
This website is best viewed with Internet Explorer 5 or higher, at a resolution of 1024x768 or greater.