[Solved] How do I define sounds?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
KadoDragon
Posts: 34
Joined: Sat Oct 18, 2014 3:54 am

Re: How do I define sounds?

Post 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.
Post Reply