Zveroboy1 Posted January 8, 2019 Share Posted January 8, 2019 Okay let's say I want to have the AI defender launch a counter attack when the human player moves to a certain spot. I know how to do this but what happens if I insert another order after the trigger and the counter attack? Will this order be ignored and the defending units stay put if the trigger is not activated? In other words, can I use more than one order to develop a counter attack? 0 Quote Link to comment Share on other sites More sharing options...
A Canadian Cat Posted January 8, 2019 Share Posted January 8, 2019 I am not totally getting the question. Orders are executed in order so if you have a unit that waits for a trigger and then executes the counter attack then adding more orders after that will give them something to do if the trigger is hit and after their counter attack orders are completed. The wait for trigger statement is not a "if then else" it is a "wait until" statement. What they wait on is either the trigger event to happen to the time to run out. 0 Quote Link to comment Share on other sites More sharing options...
domfluff Posted January 8, 2019 Share Posted January 8, 2019 Yeah, Triggers are not "if-then", it's "wait here until this condition is met, then continue with your orders". In that sense they're fundamentally similar to the inbuilt "leave after" orders, but rather than being based on the clock, they're based on units in a location. You can be a little clever about it - if the assembly/waiting point is covering one flank, and you're happy for them to hang around there for the duration, then a trigger on the other flank becomes a "if they come this way, hold fast, if they go that way, go over there", but that's very map dependent. Conditions would improve the potential for scripting significantly, but the tools that exist are still pretty powerful. 0 Quote Link to comment Share on other sites More sharing options...
Zveroboy1 Posted January 9, 2019 Author Share Posted January 9, 2019 Quote In that sense they're fundamentally similar to the inbuilt "leave after" orders, but rather than being based on the clock, they're based on units in a location. Okay thanks. I more or less understood how it worked before but the way you put it, comparing it to leave after order, makes perfect sense. Quote You can be a little clever about it - if the assembly/waiting point is covering one flank, and you're happy for them to hang around there for the duration, then a trigger on the other flank becomes a "if they come this way, hold fast, if they go that way, go over there" Yeah that's what I did actually in my test. This way they only counter attack if the attack is on the opposite corner of the map. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.