Jump to content

Callback through resources


dugasz1

Recommended Posts

Posted

Hello!

Is it possible to make callbacks through resource without exports ?
Like:

resource1:

function addCallback(theFunc)
  --Somehow store the func for later
end

function callCallback()
  --Call the callback when it's  needed
end

resource2:

function callback()
  --Callback handle something
end

exports.resource1:addCallback(callback) --Added the callback

Any tip or solution?

Sorry for lot of questions and thanks for the answers! :)

Posted

I know but in my case it wouldn't be a comfortable solution. I would like to do it like i mentioned.

Sorry for lot of questions and thanks for the answers! :)

Posted

Thank you. 

I will use itt for costume GUI system. This way looks better too me but should i use it or triggers? Any performace difference?

Sorry for lot of questions and thanks for the answers! :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...