Createa variable (integer) that with every 'shot' decreases. If you're attacking, it's a different story..... If/then/else trigger to determine whether shot goes.
Trigger 1:
EVENT: Your event
ACTION: If variable=0 THEN Do nothing else ... (I don't really know what you want)
Make a variable called ammo or somthing to that effect. have it so that every time the guy shoots it goes down one. have a trigger that says something like:
----Event
-------generic unit event - unit is is issued an order targeting an object
-
----Condition
-------unit type - unit type of attacking unit is equal to *your guy*
-------order - issued order is equal to "attack"
-
----Action
-------if ammo is = 0 then order attacking unit to stop else set ammo = (ammo-1)
-
I'm not sure if the "generic unit event - unit is is issued an order targeting an object" will work if you never tell the guy to attack again after the first right-click. But other then that this trigger should work
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.