Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Sound with a tap

I am new to CODEA and Lua as a whole. I was trying to make something and I can't seem to find something. I was just wonder what I could to to have the program to make a sound when I tap the screen. I can't seem to figure it out.

Comments

  • IgnatzIgnatz Mod
    Posts: 5,396
    function touched(t)
        if t.state==ENDED then --play sound when tap stops
            sound(SOUND_POWERUP)
            --or
            sound( "A Hero's Quest:Arrow Shoot 1" )
            --a longer one
            music( "A Hero's Quest:Battle" )
        end
    end
    
Sign In or Register to comment.