View Single Post
  #23  
Old 06-25-2007, 12:14 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I've recently given this a bit more thought and I think this could work

Private Variables: Set by default, only the current object and all child objects can access variables.

Trust Variables: An extension of private. All variables will become private but you can add what objects are trusted. For example, a DBNPC called System may have trust with a DBNPC called Accounts. This one is not as important but it would be cool

Public Variables: When created, the player will have to set the variable as public. Public variables will have two settings: read and read/write. This could be done like
PHP Code:
obj.public=0// Variable is private
obj.public=1//Object is public read-only
obj.public=2//Object is public read/write 
Although the two levels of public variables aren't vital as such, they would definitely be handy. These settings should also use inheritance although a child can change it's variable settings if desired.

Doable?
Reply With Quote