Results 1 to 3 of 3

Thread: link sound to button press?

  
  1. #1
    knblh is offline -Hacks Newbie
    Join Date
    Jun 2006
    Posts
    1
    Rep Power
    0

    Default

    does anyone know would i be able to link a sound to a button press? for example press x for horn etc? thanks and great site btw

    thanks
    Brian


  2. #2
    soulkiller is offline -Hacks Smarty
    Join Date
    Jan 2006
    Location
    pffff I\'m not telling you
    Posts
    197
    Rep Power
    14

    Default

    you would do something like

    pad=Controls.read()
    sound = Sound.load("sound.wav")
    while true do
    pad=Controls.read()
    if pad:cross() then
    sound:play()
    end
    end



    something like that
    GOOGLE IS YOUR FREIND, USE IT. IF GOOGLE FAILS THEN REFER TO THIS LINK MQ:BtG Programmer

  3. #3
    romero126 is offline -Hacks Neophyte
    Join Date
    Jan 2006
    Posts
    81
    Rep Power
    14

    Default

    you dont need to have pad=Controls.read at the verry top since its called inside the loop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •