. . . Posted May 4, 2018 Share Posted May 4, 2018 Hello, I have problem I do not undersand, help is appreciate. I try use TheFocalPoint in modmain action (I want sound only play for one who preform action) Spoiler local ACTION1 = GLOBAL.Action() ACTION1.str = "Action1" ACTION1.id = "ACTION1" ACTION1.fn = function(act) GLOBAL.TheFocalPoint.SoundEmitter:PlaySound("dontstarve/creatures/smallbird/chirp") end AddAction(ACTION1) and get this crash attempt to index upvalue 'TheFocalPoint' (a nil value) If anyone can help that be fantasic, thanks for your time! Link to comment Share on other sites More sharing options...
IronHunter Posted May 5, 2018 Share Posted May 5, 2018 The problem is act doesn't contain focalpoint or inst. I don't know off the top of my head but I believe focalpoint is similar to cameras and requires finding parent or child of act.doer which is inst. Usually I think sound emitters are called in states not actions as it is easier to control the timing and link to the sound emitter. Link to comment 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