Jump to content
Sign in to follow this  
868

shots fired

Recommended Posts

Hi,

I'm trying to have an AI fire certain amount of shots or on confirmed kill of human player AI can stop firing.

I know its gotta be something along the line of 'shotFired' but have no clue as how to impliment it.

The purpose of this script is to hide/takecover (using setUnitPos "down"/"middle") once certain shots are fired, and hopefully this goes on a loop until the AI is dead.

Anyone care to try?

Thanks in advance.

Share this post


Link to post
Share on other sites

Well, right off the top of my head, I think you should attach a "fired" event handler to the unit, and increment a shot counter. When the shot counter reaches your threshold, issue the command to take cover/stop shooting/pick his nose/whatever. Then, make sure to clear the counter when he is supposed to go back to shooting again.

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  

×