I'm trying to figure out a way for an action (movement) to activate only if three other actions (TUNIs) are successful, not just one or two, all three and at the same time they must be successful.
I cant figure out a way to do it, if its possible, how do you do it?
Basically, I'm looking for a unit to do a movement aciton only when the player has units in three seperate areas at the same time, inside each polygon'd area (seperate TUNIs setup for each area). I just cant figure out a way to activate the movement action ONLY when all 3 of the TUNI actions are successful.
MA to test for MAs?
Nest them.
Let's say A checks if units are in location X, B checks if units are in location Y, and C tests if units are in location Y.
If A is successful, have the B action activate, if B is successful, have the C action activate, if C is successful, then all three (A,B,C) are successful, and you can activate your script.
Let's say A checks if units are in location X, B checks if units are in location Y, and C tests if units are in location Y.
If A is successful, have the B action activate, if B is successful, have the C action activate, if C is successful, then all three (A,B,C) are successful, and you can activate your script.
Yeah, with location TUNIs that's a good way to handle it--or anything that requires three actions to be active simultaneously. You'll want those TUNIs to deactivate "never," so that if a unit leaves and comes back it will still work--Also, a failure of TUNI A should deactivate TUNI B and so on, so that a single unit can't wander from A to B to C and set them all off.
If you wanted to test for three actions that have been active, there are tricks for doing that too (you aren't, but I'm just throwing it out there for reference). I usually use a "counter" unit for things like that, one that has no movement capacity and all of its sequences are blank so it can be visible for engine purposes without being visible to the eye. If an action activates, a counter appears--so then if all three have activated at one time or another, three counters will be visible and you can use a test for that number of them to do what you want. Why is this useful? For example, let's say you have a series of six randomized waves, and you have a really tough wave that don't want to show up right away--say you want it to only be one of the last three waves that appear. So you put the other five in the action list that dispatches waves. Then every time a wave appears, a counter appears. Once three counters have appeared, you activate a Munger that adds in that tougher wave, and it will then be random only within the three remaining waves. Neat, huh?
If you wanted to test for three actions that have been active, there are tricks for doing that too (you aren't, but I'm just throwing it out there for reference). I usually use a "counter" unit for things like that, one that has no movement capacity and all of its sequences are blank so it can be visible for engine purposes without being visible to the eye. If an action activates, a counter appears--so then if all three have activated at one time or another, three counters will be visible and you can use a test for that number of them to do what you want. Why is this useful? For example, let's say you have a series of six randomized waves, and you have a really tough wave that don't want to show up right away--say you want it to only be one of the last three waves that appear. So you put the other five in the action list that dispatches waves. Then every time a wave appears, a counter appears. Once three counters have appeared, you activate a Munger that adds in that tougher wave, and it will then be random only within the three remaining waves. Neat, huh?