sirrNaDE Posted July 18, 2021 Share Posted July 18, 2021 hey there, i am trying to add sound emitters to existing entities (specifically boulders), but i just cant seem to work. any kind of help would be appritiated, and i am pretty new to modding, so might definitely be missing something. here's the code: Assets = { Asset("SOUNDPACKAGE", "sound/rockysound.fev"), Asset("SOUND", "sound/rockysound_bank02.fsb"), } local prefabs = { "rocks", } print("test if this works") -- creates sound effects for rocks local function rock1_sounds(inst) local inst = rock1_fn() if not TheWorld.ismastersim then --THIS IS PURELY REFERENCE on where your code needs to go. return inst end local function onnear(inst) --when you approach the structure inst.SoundEmitter:PlaySound("rockysound/untitled/rockysound") end print("test if this also works") return inst end Link to comment https://forums.kleientertainment.com/forums/topic/131953-making-already-existing-entities-emit-sounds/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now