Change house ownership via script?

Post » Sat May 28, 2011 2:33 am

I need to change the ownership of the player owned home to an NPC then switch it back again later on.

How do I do this?
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Sat May 28, 2011 2:11 am

Instead of changing ownership of the house, wouldn't a "tenant" faction be easier? The Player could be always in it and the renter added to it and removed from it as applicable. That way the owner (Player) alway retains access, and you aren't locked out of your own house.

You'd need one per house, of course.
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Sat May 28, 2011 4:55 am

Instead of changing ownership of the house, wouldn't a "tenant" faction be easier? The Player could be always in it and the renter added to it and removed from it as applicable. That way the owner (Player) alway retains access, and you aren't locked out of your own house.

You'd need one per house, of course.

Well I need to have the player denied access, like he is breaking in.

It is a mod to rent out the players houses. On renting out, the key for that house is removed and only given back on ending the rental agreement.

I have new NPC's that appear in the homes once they are rented, but I can't give the ownership only to them.
User avatar
ZANEY82
 
Posts: 3314
Joined: Mon Dec 18, 2006 3:10 am

Post » Sat May 28, 2011 1:53 am

Then you use SetOwnership. At least you don't have any issue remembering who to give it back to at the end of the lease!

You may still need a faction if more than one NPC (e.g husband and wife, master and servant) will occupy the rental property.
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Sat May 28, 2011 9:14 am

Then you use SetOwnership. At least you don't have any issue remembering who to give it back to at the end of the lease!

You may still need a faction if more than one NPC (e.g husband and wife, master and servant) will occupy the rental property.

Yes but SetOwnership won't work with interior cells. Also I've just tried changing the ownership of the Players house in the CS and even then it still allows me access and all the chests etc still belong to me.

I think maybe something is messing with the Player owned homes ownership settings. But I don't know what.
User avatar
Charles Mckinna
 
Posts: 3511
Joined: Mon Nov 12, 2007 6:51 am

Post » Sat May 28, 2011 1:28 am

It's SetCellOwnership, not SetOwnership.
User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm


Return to IV - Oblivion