Editor Sound Emitter

Simple editor sound emitter works in game only

Add a new emitter to the world where you want the sound to occur. Add this script and fill in the variables.

require "Scripts/Functions/ReleaseTableObjects.lua"

Script.soundfile=""--path "Ambient Sound" 
Script.range=20.0--float "Range"
Script.volume=1--float "Volume"
Script.pitch=1--float "Pitch"
Script.loop=true--bool "Loop"

function Script:Start()
    if self.sound~="" then 
        self.sound = Sound:Load(self.soundfile) 
        self.entity:EmitSound(self.sound, self.range, self.volume, self.pitch, self.loop);
    end
end

function Script:Stop()
end

function Script:Cleanup()
end
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License