Jump to content

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×