added sounds

This commit is contained in:
spencer-ki 2022-01-01 23:43:23 -08:00
parent fad89bd65d
commit dc4a0a8e79
13 changed files with 18 additions and 12 deletions

View File

@ -28,10 +28,11 @@ local commandDB = {}
local gameMsgs = { local gameMsgs = {
push = { push = {
{'ALL GROUND UNITS, PUSH TO THE ACTIVE ZONE!', '.wav'}, {'ALL GROUND UNITS, PUSH TO THE ACTIVE ZONE!', 'push_next_zone.ogg'},
{'ALL GROUND UNITS, PUSH TO ALPHA!', '.wav'}, {'ALL GROUND UNITS, PUSH TO ALPHA!', 'push_alpha.ogg'},
{'ALL GROUND UNITS, PUSH TO BRAVO!', '.wav'}, {'ALL GROUND UNITS, PUSH TO BRAVO!', 'push_bravo.ogg'},
{'ALL GROUND UNITS, PUSH TO CHARLIE!', '.wav'}, {'ALL GROUND UNITS, PUSH TO CHARLIE!', 'push_charlie.ogg'},
{'ALL GROUND UNITS, PUSH TO DELTA!', 'push_delta.ogg'},
}, },
fallback = { fallback = {
{'ALL GROUND UNITS, FALL BACK!', '.wav'}, {'ALL GROUND UNITS, FALL BACK!', '.wav'},
@ -40,13 +41,17 @@ local gameMsgs = {
{'ALL GROUND UNITS, FALL BACK TO CHARLIE!', '.wav'}, {'ALL GROUND UNITS, FALL BACK TO CHARLIE!', '.wav'},
}, },
cleared = { cleared = {
{'ZONE CLEARED!', '.wav'}, {'ZONE CLEARED!', 'cleared_active.ogg'},
{'ALPHA CLEARED!', '.wav'}, {'ALPHA CLEARED!', 'cleared_alpha.ogg'},
{'BRAVO CLEARED!', '.wav'}, {'BRAVO CLEARED!', 'cleared_bravo.ogg'},
{'CHARLIE CLEARED!', '.wav'}, {'CHARLIE CLEARED!', 'cleared_charlie.ogg'},
{'DELTA CLEARED!', 'cleared_delta.ogg'},
}, },
success = { success = {
{'GROUND MISSION SUCCESS!', '.wav'}, {'GROUND MISSION SUCCESS!', 'mission_success.ogg'},
},
start = {
{'SUPPORT THE WAR ON THE GROUND!', 'support_troops.ogg'},
}, },
@ -124,7 +129,7 @@ local function processMsgBuffer(vars)
if #game_message_buffer > 0 then if #game_message_buffer > 0 then
local message = table.remove(game_message_buffer, 1) local message = table.remove(game_message_buffer, 1)
trigger.action.outText(message[1], 10, true) trigger.action.outText(message[1], 10, true)
--play the sound file message[2] trigger.action.outSound(message[2])
end end
local id = timer.scheduleFunction(processMsgBuffer, 1, timer.getTime() + 5) local id = timer.scheduleFunction(processMsgBuffer, 1, timer.getTime() + 5)
end end
@ -373,7 +378,7 @@ end
function RotorOps.drawZones() function RotorOps.drawZones() --this could use a lot of work, we should use trigger.action.removeMark and some way of managing ids created
local zones = RotorOps.zones local zones = RotorOps.zones
local previous_point local previous_point
@ -394,7 +399,7 @@ function RotorOps.drawZones()
if zone.name == RotorOps.active_zone then if zone.name == RotorOps.active_zone then
id = id + 300 id = id + 300
color = {1, 1, 1, 0.2} color = {1, 1, 1, 0.2}
fill_color = {1, 0, 0, 0.03} fill_color = {1, 0, 0, 0.05}
end end
if previous_point ~= nill then if previous_point ~= nill then
--trigger.action.lineToAll(coalition, id + 200, point, previous_point, color, line_type) --trigger.action.lineToAll(coalition, id + 200, point, previous_point, color, line_type)
@ -490,6 +495,7 @@ function RotorOps.startConflict()
--RotorOps.sendUnitsToZone(helicopters, RotorOps.zones[2].name, nil, nil, 90) --RotorOps.sendUnitsToZone(helicopters, RotorOps.zones[2].name, nil, nil, 90)
RotorOps.sendUnitsToZone(staged_units, RotorOps.zones[1].name) RotorOps.sendUnitsToZone(staged_units, RotorOps.zones[1].name)
RotorOps.setActiveZone(1) RotorOps.setActiveZone(1)
gameMsg(gameMsgs.start)
gameMsg(gameMsgs.push, 1) gameMsg(gameMsgs.push, 1)
processMsgBuffer() processMsgBuffer()
local id = timer.scheduleFunction(RotorOps.assessUnitsInZone, 1, timer.getTime() + 5) local id = timer.scheduleFunction(RotorOps.assessUnitsInZone, 1, timer.getTime() + 5)

BIN
sound/cleared_active.ogg Normal file

Binary file not shown.

BIN
sound/cleared_alpha.ogg Normal file

Binary file not shown.

BIN
sound/cleared_bravo.ogg Normal file

Binary file not shown.

BIN
sound/cleared_charlie.ogg Normal file

Binary file not shown.

BIN
sound/cleared_delta.ogg Normal file

Binary file not shown.

BIN
sound/mission_success.ogg Normal file

Binary file not shown.

BIN
sound/push_alpha.ogg Normal file

Binary file not shown.

BIN
sound/push_bravo.ogg Normal file

Binary file not shown.

BIN
sound/push_charlie.ogg Normal file

Binary file not shown.

BIN
sound/push_delta.ogg Normal file

Binary file not shown.

BIN
sound/push_next_zone.ogg Normal file

Binary file not shown.

BIN
sound/support_troops.ogg Normal file

Binary file not shown.