GhostXoP Posted June 21, 2012 Posted June 21, 2012 can global variables from one resource, be used from another? Say House resource is started and the server script contains a global variable called MyBigHouse And you start another resource called Store, but it uses a global variable called MyBigHouse. Will they interfere? I understand Events are generally system wide, and you can add an event handler to certain resources that trigger it but. What about variables?
GhostXoP Posted June 21, 2012 Author Posted June 21, 2012 Thank you, but i stand correct, events being system wide? Or are they resource dependent as well?
GhostXoP Posted June 21, 2012 Author Posted June 21, 2012 If a Resource registers an event, can another resource trigger that event?
Castillo Posted June 21, 2012 Posted June 21, 2012 Events are attached to the function given, I seriously don't get your point.
GhostXoP Posted June 21, 2012 Author Posted June 21, 2012 Resource1 creates event "MyEvent" Resource1 Adds an event handler to MyEvent. Can Resource2 Trigger "MyEvent" Even tho its not defined in Resource2's script.
GhostXoP Posted June 21, 2012 Author Posted June 21, 2012 Just tested the idea, you are correct events are Resource dependent. Thank you.
mjau Posted June 21, 2012 Posted June 21, 2012 Just tought i should meantion you can trigger a function which triggers the event with exported functions .....
DiSaMe Posted June 21, 2012 Posted June 21, 2012 Events are independent from resources. Once an event is added with addEvent, any resource can trigger that event or attach handler functions to it.
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