Hi, I know how to play a sound when entering a hotspot. But how to play a sound when e.g. showing the "Use" oder the "Look" icon? If I could run an action list when showing the icons, I would be glad. But I did not find a hook for that. The background: I make games for disabled people that can not use the mouse. They have to get an instant audio feedback when seeing/ changing the icon. How to get that? Thanks for help!
Comments
This function calculates a new value for the "interactionIndex" variable, which is used to access the correct Hotspot interaction:
myHotspot.useButtons [interactionIndex]
would return the associated Button class on myHotspot.
Now, the currently selected Hotspot can be retrieved through:
AC.KickStarter.playerInteraction.GetActiveHotspot ();
And the Button class contains an iconID integer, which represents which "icon" that particular interaction it has (Use/Look etc). You should therefore be able to use this to work out which sound to play:
AC.KickStarter.playerInteraction.GetActiveHotspot ().useButtons [interactionIndex].iconID;
Will return e.g. 0 for Use, 1 for Look etc.