So, from what I understand I can do something like this:
function createTribe(%name, %owner)
{
%tribe = new ScriptObject(%name @ "TribeObj")
{
class = TribeObj;
owner = %owner;
tribename = %name;
};
announce("The tribe" SPC %tribe.tribename SPC "was created by" SPC %tribe.owner @ "!");
}
And, I can assign functions to it:
//richards is the name of the tribe
function richardsTribeObj::Disband(%so)
{
announce("The tribe" SPC %so.tribename SPC "has disbanded!");
%so.delete();
}
But I still have no idea how to apply this to my situation. Here are some of the mysteries:
When I want to add a member to the tribe, what would I do? Would I just make a loop checking if member1 is defined, and if it is try member2, ect? Or is a better way just to make a big list-y string that has all of the member's IDs?
Another one is what exactly do classes do? I still haven't figured that one out.
Is there a way that I can make all TribeObjects inherit from something? Like, if I make a function such as the disband one, it'll work with richardsTribeObj but not NachoTribeObj.