Hi there,
I’m looking to trigger a sound when a plane is pressed down.
There doesn’t seem to be any step-by-steps on this so i’m missing something crucial…
I have a 1 second audio clip, tried both wav and ogg.
The clips aren’t playing sound when the play icon is pressed in the properties menu.
Nor does any sound happen when you create a timeline.
My presseddown script looks like this:
const lilypad_png1 = parent;
- parent.on(“pointerdown”, (e) => {
- // Runs when pointerdown occurs on the parent node
- // The argument e contains useful info about this event:
- // https://docs.zap.works/studio/scripting/reference/object/events/pointerdown/
- lilypad_png1
- lilypad_png1.visible(false)
-
var myaudio = Z.Audio("g3.wav");
-
myaudio.start();
- What do will I need to write in the myaudio.start();
Thank you for your help!