Dev:SDK/Slave Maker - House

From Slavemaker Wiki
Jump to: navigation, search
<<first <prev SDK/Slave Maker - House next> last>>


Housing


There are variables and functions that control the house thay you live in.

Basic House Object[edit]

Your home is stored in an object

var Home:Housing;

an instance of this class

class Housing extends Place {
        public var HouseType:Number;
        public var hKitchen:Number;
        public var hLibrary:Number;
        public var hDungeon:Number;
        public var hWards:Number;
        public var hIncome:Number;
       
        public var HomeRoom:Number;
        public var HomeBath:Number;
        public var HomeDungeon:Number;
        public var HomeKitchen:Number;
       
        public function Housing(type:Number, count:Number)
        public function Load(cookieobj:Object)
        public function Save(cookieobj:Object)
}

eg

if (_root.Home.HouseType == 1) {
        _root.SetText("The Abandoned Keep is cold and dirty...");
}

Member variables[edit]

HouseType - the type of house
  1. Castle
  2. Forest
  3. Farm
  4. Mansion
  5. Apartment
  6. Temple
  7. Onsen
  8. Brothel
  9. Eerie
hKitchen - the quality of your kitchen,
  1. basic
  2. good
  3. very good
hLibrary - the quality of your library
  1. none
  2. good
  3. very good
hDungeon - the quality of your dungeon
  1. none
  2. good
  3. very good
hWards - are magical wards present
  1. none
  2. present
hIncome - how much income does the house generate, in GP per day

HomeRoom, HomeBath, HomeDungeon, HomeKitchen are the frame in the backgrounds shown when the rooms are used

Note

  1. the core variable _root.House is depreciated in preference to using this object. The game engine only uses _root.Home.HouseType and the variable _root.House will be deleted in the next release
  2. the member functions of the Housing class are really for internal use, please ignore
  3. note derived for Place base class so all members and variables of that class are available

Core Functions[edit]

These functions are present in the object _root.HouseEvents


ChangeHouse
function ChangeHouse(house:Number)
Change to a new house, house is the number above for HouseType. This function is present in the JouseEvents object

eg

_root.HouseEvents.ChangeHouse(9);
Backgrounds
These functions in _root.Backgrounds show appropriate rooms for your house
ShowBedRoom
ShowBath
ShowDungeon
ShowKitchen

There is also this function that shows a generic bckground for your home

ShowHousing
function ShowHousing()

eg

_root.Backgrounds.ShowHousing();


<<first <prev SDK/Slave Maker - House next> last>>