Playing audio in tapped script
Used the default script for the on tapped event. Changed it so it displayed to coordinates onscreen through the text logger. That was successful, so I put in the default audio command. The audio component is connected to the object that the script is. Here is my code. Any help would be appreciated.
// -----JS CODE-----
function onTapped(eventData)
{
global.logToScreen("Tap Position: (" + eventData.getTapPosition().x + ", " + eventData.getTapPosition().y + ")");
// Play Audio
// @input Component.AudioComponent audio
script.audio.play(1);
}
var event = script.createEvent("TapEvent");
event.bind(onTapped);
Whoops, figured it out. Sorry!
It'd be nice if you posted working code... -.-
yes please post your fix...