Add countdown sounds to Tumbler
authorWuzzy <almikes@aol.com>
Thu, 24 Nov 2016 01:04:55 +0100 (2016-11-24)
changeset 12058 281a4f33b08f
parent 12057 144264948277
child 12059 0e6f044daeac
Add countdown sounds to Tumbler
ChangeLog.txt
share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua
--- a/ChangeLog.txt	Thu Nov 24 00:50:40 2016 +0100
+++ b/ChangeLog.txt	Thu Nov 24 01:04:55 2016 +0100
@@ -68,6 +68,7 @@
   + chancetime: Per-turn % chance of an utility crate (extra time) drop
  + Alternative weapon selection with slot keys (F1, F2, F3)
  + Add mine/barrel launch sounds
+ + Add countdown sounds
  + Rewrote mission description and captions
  + Sound and message when trying to fire empty weapon
  * Permanently disable some game modifiers which won't work together with this
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Thu Nov 24 00:50:40 2016 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Thu Nov 24 01:04:55 2016 +0100
@@ -766,6 +766,13 @@
 			TimeLeftCounter = 0
 			TimeLeft = TimeLeft - 1
 
+			-- Countdown sounds
+			if TimeLeft == 5 then
+				PlaySound(sndHurry, CurrentHedgehog)
+			elseif TimeLeft <= 4 and TimeLeft >= 1 then
+				PlaySound(_G["sndCountdown"..TimeLeft])
+			end
+
 			if TimeLeft >= 0 then
 				DrawTag(0)
 			end