Revolver

Level 14
Joined
Oct 28, 2019
Messages
536
Hello, everybody! I'm working on some 1800s-themed unit edits, and I have an idea for an officer or mounted cavalry unit that uses a revolver.

Regarding the cooldown, is it possible to make the unit fire 6 shots with a 0.5-second cooldown between them, followed by a longer cooldown while the unit reloads the revolver?
 
You can track whenever a unit shoots (attacks), subtract their "ammo" Integer by 1, check if it reached 0, if true then disable their attack -> Wait X seconds -> and enable it again + reset "ammo" back to 6.

There's many ways of going about this and many possible outcomes. I would use a Unit Indexer for everything but you could also use a Hashtable.
 
Last edited:
Back
Top