Jump to content
Sign in to follow this  
rangerpl

We've Been Compromised!

Recommended Posts

I'm looking for a way to program a script where, if the player's group has made its presence visible, the enemy HQ will send a force of troops to deal with the player.

Now, I want to make it so that just taking out some enemies won't be enough to trigger this, and that you'd need to get in a firefight with a squad or two in order for one of them to radio HQ and ask for reinforcements.

I know how to spawn the "quick response force" but I can't think of a way to effectively trigger this.

Share this post


Link to post
Share on other sites

You could continuously count how many enemies know about the player and trigger the QRF after a certain threshold is reached.

For example:

{(side _x == east) && (_x knowsAbout player > .8)} count allUnits > 5

If you wanted to do it over a smaller area you could count only those within the trigger boundaries using thisList.

Share this post


Link to post
Share on other sites

You could trigger it when squad leader from two or more large groups have a high KnowsAbout the player. Or when certain enemy units from those squads die.

Or place an important target, and trigger the counterattack if it dies. Players will go to any length to destroy a truck-mounted ZU-23 before they get in a firefight. And when the truck dies, make other squads move to engage, guaranteeing contact.

Share this post


Link to post
Share on other sites

So there's no problem if I use a continuous loop to trigger this?

Share this post


Link to post
Share on other sites

Not really, no. As long as the loop is only being run once per frame (which is how triggers operate by default, I believe), the code involved isn't complex enough to have any sort of noticeable performance impact. Computers can count very quickly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×