GhostXoP Posted June 21, 2012 Share 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? Link to comment
Castillo Posted June 21, 2012 Share Posted June 21, 2012 Variables aren't shared within resources. Link to comment
GhostXoP Posted June 21, 2012 Author Share Posted June 21, 2012 Thank you, but i stand correct, events being system wide? Or are they resource dependent as well? Link to comment
Castillo Posted June 21, 2012 Share Posted June 21, 2012 I don't understand what do you mean. Link to comment
GhostXoP Posted June 21, 2012 Author Share Posted June 21, 2012 If a Resource registers an event, can another resource trigger that event? Link to comment
Castillo Posted June 21, 2012 Share Posted June 21, 2012 Events are attached to the function given, I seriously don't get your point. Link to comment
GhostXoP Posted June 21, 2012 Author Share 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. Link to comment
GhostXoP Posted June 21, 2012 Author Share Posted June 21, 2012 Just tested the idea, you are correct events are Resource dependent. Thank you. Link to comment
mjau Posted June 21, 2012 Share Posted June 21, 2012 Just tought i should meantion you can trigger a function which triggers the event with exported functions ..... Link to comment
DiSaMe Posted June 21, 2012 Share 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. Link to comment
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