Yes I have finally created a "Perfect" ammo system with EUDs. How this works is it detects cooldown. Since cooldown is on a third byte, you need to multiply the value you want by 65536. However, the second byte is ever changing and I don't know how to make it stay at a certain value so. Even though we had found the cooldown byte, it still took quite a long time to get it to work perfectly with your attack. Without hypers would make it mess up 20% of the time and with hypers would make the trigger run too many times. Limited by using only at least and at most, I have found a very simple way to do this.
For those who didn't want to read the giant paragraph:
LimitsOn the third byte.
Second byte is always changing.
You can only use 'at least' and 'at most' for this.SetupTake the cooldown amount you want to detect and multiply it by 65536 (for the third byte).
Making it work as an Ammo SystemUsing a switch, you can make it only detect your shot once. However, we have also discovered that cooldown is set before the animation occurs so "fake" shots may occur.
We use 3 because it is the best place for all unit attack cooldowns.
Trigger |
Conditions: |
¤ Cooldown for Unit 1 is at least 65536*3. |
¤ 'Switch 1' is Cleared. |
Actions: |
¤ Set 'Switch 1'. |
¤ Do whatever you want because the unit shot |
Trigger |
Conditions: |
¤ Cooldown for Unit 1 is at most (65536*3) - 1. |
¤ 'Switch 1' is Set. |
Actions: |
¤ Clear 'Switch 1'. |
Attached is an example map.
[attachmentid=15916]
A very special thanks to Mr.Mooo_Cow(U) for finding the cooldown byte!If an admin or DLDB manager could update the
uBeR@TiOn Data Files and add "Cooldown" to the list, that would be great
[attachmentid=15917]