- Joined
- Oct 9, 2020
- Messages
- 35
Hello. I'm hoping someone will be able to help me with this. I want the Mortar Team to have limited ammo. My current trigger is posted below using Bribe's DamageEngine system. I have tried the following approaches but I each has issues with it:
Suggestions on how to fix my trigger or for alternative solutions are greatly appreciated. The more elegant the solution, the better. I'd prefer not to install yet another system to my project unless it has wide utlility. Thanks!
- AOEDamageEvent - Mostly works. The issue, only works when AOE damage has occurred. If only the direct target is damaged, the ammo is not spent.
- DamageEvent - A ammo is spent for every unit damaged in the AOE, even though it's just one attack.
- Unit is attacked event - This is so buggy as to be completely off the table. The ammo is spent when the Mortar Team begins their attack animation. The slightest interruption results in ammo being spent without the missile even being launched (move commands, stop commands, switching targets, etc.). Also, won't even launch the last missile, but spends it anyway.
-
Ammo
-
Events
- Game - AOEDamageEvent becomes Equal to 1.00
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of AOEDamageSource) Equal to Mortar Team
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Item - Set charges remaining in (Item carried by AOEDamageSource in slot 1) to ((Charges remaining in (Item carried by AOEDamageSource in slot 1)) - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by AOEDamageSource in slot 1)) Less than or equal to 0
-
Then - Actions
- Unit - Add Disable Attack to AOEDamageSource
- Else - Actions
-
If - Conditions
-
Events
Suggestions on how to fix my trigger or for alternative solutions are greatly appreciated. The more elegant the solution, the better. I'd prefer not to install yet another system to my project unless it has wide utlility. Thanks!