Galwran Posted November 21, 2012 Posted November 21, 2012 Hi. Lets say that I make a mission, in which allied ground forces are advancing towards a target area that is also a trigger zone. However, allied air units will be flying over that zone all the time. How can I make it so that the trigger zone works 1) only for ground units 2) only for air units 3) only for air units flying between certain min and max altitude 4) for all kinds of units? Also, it might be nice to trigger something only when the vehicle in the trigger zone is controlled by the player. I know that you can trigger by unit names, but now you can control so many vehicles that it becomes a burden for the mission maker.
Derk Posted November 21, 2012 Posted November 21, 2012 Now, please understand that i am still learning the ME, but what comes to mind is that you can use the "altitude is higher/lower than" conditions to create vertical borders to your trigger zone. It's not perfect, but it should work to solve all 4 issues. [sIGPIC][/sIGPIC]
Galwran Posted November 21, 2012 Author Posted November 21, 2012 (edited) Now, please understand that i am still learning the ME, but what comes to mind is that you can use the "altitude is higher/lower than" conditions to create vertical borders to your trigger zone. It's not perfect, but it should work to solve all 4 issues. Thanks, but I believe that you have to set the altitude for specific unit for the trigger to work; this becomes tedious when there are lots of different units. I haven't found a way to make a trigger that requires that " blue coalition unit in zone= true AND altitude of the unit is >200m AND altitude of the unit is <1000m" Edited November 21, 2012 by Galwran
mjeh Posted November 21, 2012 Posted November 21, 2012 (edited) If you have a manageable number of ground unit groups, you can check to see if one of the ground unit groups is in the target zone with the use of the [OR] separator in the conditions field of the trigger, this way you don't need to check parameters of the specific unit entering the zone Say that you have 4 groups of ground units, Ground Group A, Ground Group B, Ground Group C and Ground Group D Then, in the trigger condition section, do: Conditions: PART OF GROUP IN ZONE(Ground Group A, Zone X) [OR] PART OF GROUP IN ZONE(Ground Group B, Zone X) [OR] PART OF GROUP IN ZONE(Ground Group C, Zone X) [OR] PART OF GROUP IN ZONE(Ground Group D, Zone X) These conditions will evaluate as true if any unit from Ground Group A, B, C or D enters Zone X. You can of course also use ALL OF GROUP IN ZONE() if you prefer. Usually with a bit of planning you probably won't need that many ground unit _groups_ (remember that a single group can have a ton of units in it) and as such it should be manageable, if a bit fiddly You can create a different trigger using exactly the same logic for air unit groups, unfortunately you need a reference to the specific unit to do altitude checks and the mission editor doesn't provide an easy way to do this unless you know lua scripting. Consider if you need to check altitude for any aircraft that flies through the zone, or just for a few specific ones like the player aircraft. In the former case you'll need to create a trigger for each single air unit, in the latter case you'll just need to create a trigger for the planes it matters for. If you want a trigger that fires for _ANY_ unit, just use the following conditions PART OF COALITION IN ZONE(Red, Zone X) [OR] PART OF COALITION IN ZONE(Blue, Zone X) Edited November 21, 2012 by mjeh added more info
mjeh Posted November 21, 2012 Posted November 21, 2012 Also, it might be nice to trigger something only when the vehicle in the trigger zone is controlled by the player. I know that you can trigger by unit names, but now you can control so many vehicles that it becomes a burden for the mission maker. Consider whether limiting what vehicles the player can control is a viable option, by unhooking "PLAYER CAN DRIVE" on most units. This will at least limit the number of units you have to check for in player specific triggers
Galwran Posted November 21, 2012 Author Posted November 21, 2012 Thanks. I have been using similar solutions, but of course it would be nice to have a tick box for the Part_of_group_in_zone- condition that specified whether it applies to ground, air or both kinds of units. After all, in a large battle there can be dozens of groups. The altitude condition is very nice when you try to mimick flying under the radar coverage
mjeh Posted November 21, 2012 Posted November 21, 2012 Yes indeed. The problem is as stated that the mission editor doesn't give you object references based on what object set off the trigger. This is, for me, the single biggest limiting factor of the mission editor.
Recommended Posts