You should make a different scene director in the scene. The scene director can have an audio track on it with your sound effect, as well as script event that increments the widget. The script would look something like this
`dim widget as xpCounterWidget
engine.GetWidgetByName("score", widget)
widget.up
`
Then use a script in the keyboard mapping menu and assign ALT+U as the hotkey to trigger it. This script would look for a specific scene on the output and if it finds it, then get the scene director from it and play it..
something like this (not tested, so may have a bug or two).. It looks for a scene on channel 1, layer 0 called "GameScene" and looks for a scene director called "AddScore".
`dim outfb as xpOutputFramebuffer
dim scene as xpScene
dim sd as xpSceneDirector
engine.GetOutputFramebuffer(0, outfb)
outfb.GetSceneOnLayer(0, scene)
if scene.name = "GameScene" then
scene.GetSceneDirectorByName("AddScore", sd)
sd.PlayRange(0, 30)
end if
`
#XPression