Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.
asobo-vcockpits-instruments/html_ui/Pages/VCockpit/Instruments/Shared/BaseInstrument.js
(which is the parent you sub-class to create your own HTML/JS instrument. Along with all the other fundamental methods such as Update()
and onInteractionEvent(_args)
it has: playInstrumentSound(soundId) {
if (this.isElectricityAvailable() && this.getGameState() == GameState.ingame) {
Coherent.call("PLAY_INSTRUMENT_SOUND", soundId);
return true;
}
return false;
}
onSoundEnd(_event) {
}
soundId
has to match a <Sound>
entry in sound/sound.xml
.isElectricityAvailable() { return true; }
if that's a possible issue.<AvionicSound>
section without creating your own WWise soundbank or importing the entire multi-MB soundbank.PCK from another plane into your project?this.parentInstrument.playInstrumentSound("tone_caution");
<!-- AvionicSounds ========================================================================================== -->
<AvionicSounds>
<Sound WwiseData="true" WwiseEvent="tone_caution" ViewPoint="Inside" NodeName="Screen_MFD_L"/>
<Sound WwiseData="true" WwiseEvent="tone_warning" ViewPoint="Inside" NodeName="Screen_MFD_L"/>
<Sound WwiseData="true" WwiseEvent="tone_altitude_alert_default" ViewPoint="Inside" NodeName="Screen_MFD_L" />
[...]