After looking at some historical battle scripts, I thought I'd do a little experimenting with the play_sound_event command. I added a bunch of new events to descr_sounds_narration.txt, plus the mp3s for them. It seems to work in the most basic form, but I ran into some strange behavior when trying to add a counter condition to the monitor.
This works fine:
Code:
monitor_event SettlementSelected SettlementName Rome
play_sound_event RomeSelected
end_monitor
This also works:
Code:
declare_counter PlaySpeech
set_counter PlaySpeech 1
monitor_event SettlementSelected SettlementName Rome
and I_CompareCounter PlaySpeech = 1
play_sound_event RomeSelected
end_monitor
This produces a "Sound event TEUTOBURG_SPEECH_00 not found." error when closing the game.
Code:
declare_counter PlaySpeech
;don't initialize or initilize to something other than 1
;set_counter PlaySpeech 1
monitor_event SettlementSelected SettlementName Rome
and I_CompareCounter PlaySpeech = 1
play_sound_event RomeSelected
end_monitor
Ideally, rather than having them always on, I'd like to let the player toggle them on/off at any time, something along the lines of:
Code:
declare_counter PlaySpeech
monitor_event ScrollAdviceRequested ScrollOpened helpScroll
if I_CompareCounter PlaySpeech = 0
set_counter PlaySpeech 1
end_if
if I_CompareCounter PlaySpeech = 1
set_counter PlaySpeech 0
end_if
end_event
monitor_event SettlementSelected SettlementName Rome
and I_CompareCounter PlaySpeech = 1
console_command
play_sound_event RomeSelected
end_monitor
Any thoughts?
Bookmarks