Jump to content

Variables


GhostXoP

Recommended Posts

Posted

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?

Posted

Variables aren't shared within resources.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I don't understand what do you mean.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Events are attached to the function given, I seriously don't get your point.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Resource1 creates event "MyEvent"

Resource1 Adds an event handler to MyEvent.

Can Resource2 Trigger "MyEvent" Even tho its not defined in Resource2's script.

Posted

No as far as I know.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Events are independent from resources. Once an event is added with addEvent, any resource can trigger that event or attach handler functions to it.

-

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...