export_descr_sounds_stratmap_voice - vocal Joins_Army
That's what you are looking for. Note 'vocal' instead of 'event' - totally different format, the reason why it never occurred to me actually try that with play_sound_effect.
Ah yes, 'call_object' - that might be the way. I am not familiar with it's use, withwnar may have more detailed feedback on it. The only time I have used it was to accelerate movement (space bar effect), the coding might be of some help:
Code:
monitor_event FactionTurnStart FactionIsLocal
call_object_shortcut strat_ui speedup_ai
move J-1021-ShangSheng, 162, 82
move J-1011-ZhouXin, 167, 87
call_object_shortcut strat_ui speedup_ai
terminate_monitor
end_monitor
from text\descr_shortcuts:
Code:
strat
save_stratmap S CTRL
load_stratmap L CTRL
speedup_ai SPACE
stop_character BACKSPACE
capital_zoom HOME H
toggle_sound is in the misc section, so it's probably misc_ui, not preferences:
Code:
misc
inc_scale F2
dec_scale F3
toggle_unit_visibility F3 CTRL hidden
select_all A CTRL
select_siege B CTRL
select_infantry I CTRL
select_cavalry C CTRL
select_missile M CTRL
select_melee H CTRL
select_next TAB
select_prev TAB SHIFT
deselect_all ENTER
deselect_all NUM_ENTER
hide_gui SCROLL_LOCK hidden
show_console GRAVE_ACCENT ; hidden
toggle_sound S ALT
show_help F1
quit ESC hidden
; reveal_advice Z
dismiss_advice X
screen_grab SYSRQ
On the other hand the 'hide the ui' script is using object_manager (hide_gui), but it's not with call_object:
Code:
monitor_event ShortcutTriggered ShortcutTriggered object_manager hide_gui