player ownershippermissions - best way to detect

Post » Wed Jun 20, 2012 11:52 am

what's the best way to detect if the player is permitted to activate an item?
GetActorOwner () returns the actual owner.
in oblivion, the player is sometimes permitted to access containers even if they do not own it.
we used to use IsOffLimits ().
Is there such a function in Papyrus?
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Wed Jun 20, 2012 6:59 am

I've got these scribbled on a bit of paper as the relevant things to put into some kind of general function, but I've not got that far.

ObRef.IsLocked()
Player.IsTrespassing()
ObRef.GetActorOwner()
Cell.GetActorOwner()
ObRef.GetFactionOwner()
Cell.GetFactionOwner()

Player.IsInFaction()
Player.GetFactionRank()

Edit: Oh, and Zone's can contain ownership info too, but I'm not sure if propogates down to the Cell calls.
User avatar
Cccurly
 
Posts: 3381
Joined: Mon Apr 09, 2007 8:18 pm

Post » Wed Jun 20, 2012 6:16 am

Thanks, tunaisafish!

But I found an overall solution!
I thought about wrapping all those up into a function but didn't go about it.
I thought it may get complex if the the object was Factioned owned.

But I did find something that I can use for what I need it for:
I'm using IsInMyOwnedCell: http://www.creationkit.com/IsInMyOwnedCell
It can even be used with my method of passing Conditions into Papyrus: http://www.gamesas.com/topic/1354316-conditions-in-papyrus

It can't be attached objects, however, (e.g. horse) like IsOffLimits () in Oblivion.
User avatar
Kelvin
 
Posts: 3405
Joined: Sat Nov 17, 2007 10:22 am

Post » Wed Jun 20, 2012 6:42 am

Cool find.
The ArchMage's quarters is one where the player is considered stealing until he's added to the faction, so that should work ok there.
The mage dormitory cell will be trickier though.
User avatar
Claudz
 
Posts: 3484
Joined: Thu Sep 07, 2006 5:33 am


Return to V - Skyrim