Concept of Saving var's of area's?
|
|
Is it possible to save var's of an area? I currently have a house system that goes a little something like this:
area/house House1 House2 var owned Enter(atom/movable/A) if(ismob(A)) var/mob/M=A if(owned) if(M.owner=="House1") return 1 else switch(alert("",,"Yes","No")) if("Yes") M.owner="House1" owned=1 else M<<"You dont have enough G!" if("No") return 0
and i was wondering if it would be possible to set the owner of that house as a var and then save it some how. I haven't really touched on save files in awhile so could someone give me some information on if this can be done and if so how?
~>Jiskuha
|
If the area already exists(is put on the map at compile time), then you just need to save some way to identify the area(possibly you could give each area a unique tag variable), and then the owner variable. When you load, find the area using the tag, and then set the owner.