You can have a separate death counter store minerals, and when the next trigger cycle occurs, check the money difference between the death counter and the current amount of minerals and divide the difference by 4.
The only problem would be if you mined minerals and purchased something at the same time (the minerals would not be divided), but if you use hyper triggers, that would be very unlikely.
| Trigger |
| Players: |
| ¤ Current Player |
| Conditions: |
¤ Current Player accumulates at least 32768 minerals.
|
| ¤ Current Player has suffered at least 32768 deaths of Floor Gun Trap. |
| Actions: |
¤ Set player's Resources: subtract 32768 Minerals.
|
¤ Set player's deaths of Floor Missile Trap: Add 32768.
|
¤ Set player's deaths of Floor Gun Trap: Subtract 32768.
|
| ¤ Preserve Trigger. |
| Trigger |
| Players: |
| ¤ Current Player |
| Conditions: |
¤ Current Player accumulates at least 16384 minerals.
|
| ¤ Current Player has suffered at least 16384 deaths of Floor Gun Trap. |
| Actions: |
¤ Set player's Resources: subtract 16384 Minerals.
|
¤ Set player's deaths of Floor Missile Trap: Add 16384.
|
¤ Set player's deaths of Floor Gun Trap: Subtract 16384.
|
| ¤ Preserve Trigger. |
etc.
If you don't understand what I'm doing, check the
Counter Arithmatic tutorial. Oh, and learn how binary works.
| Trigger |
| Players: |
| ¤ Current Player |
| Conditions: |
| ¤ Current Player has suffered at least 1 deaths of Floor Gun Trap. |
| Actions: |
¤ Set player's deaths of Floor Gun Trap: Set to 0.
|
| ¤ Preserve Trigger. |
| Trigger |
| Players: |
| ¤ Current Player |
| Conditions: |
| ¤ Current Player accumulates at least 128 minerals. |
| Actions: |
¤ Set player's Resources: subtract 128 Minerals.
|
¤ Set player's deaths of Floor Missile Trap: Add 32.
|
| ¤ Preserve Trigger. |
etc. until the mineral requirement is 8.
| Trigger |
| Players: |
| ¤ Current Player |
| Conditions: |
| ¤ Current Player has suffered at least 32768 deaths of Floor Missile Trap. |
| Actions: |
¤ Set player's Resources: add 32768 Minerals.
|
¤ Set player's deaths of Floor Gun Trap: Add 32768.
|
¤ Set player's deaths of Floor Missile Trap: Subtract 32768.
|
| ¤ Preserve Trigger. |
etc.
I recommend using SCMDraft to write these triggers, and if you know how to program/script, write those repetitive triggers via loops.
Right now, this means this will take effect as long as you have less than 65535 minerals. If you want to extend it, use another death counter, but I don't want to go into that.
And I hope people understand my triggers.