• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Revolver

Level 13
Joined
Oct 28, 2019
Messages
528
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?
 

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,951
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:
Top