Page 2 of 2

Re: How do I define sounds?

Posted: Wed Oct 22, 2014 7:01 am
by KadoDragon
SnowyOwl47 wrote:
Mysterious wrote:Good idea there mate, but the problem is if the player puts the Item back into the chest the Script will activate again etc...
Easy fix have a script use the if method so something like

Code: Select all

musicplayed = false
function music()
     if musicplayed == false then
         playSound("")
         musicplayed = true
    end
end
You my fine friend, have just put a lot of power into my hands. I didn't think of using bool switches. This has so many applications.