Difference between revisions of "Talk:IsInInterior - ObjectReference"
Jump to navigation
Jump to search
Talk:IsInInterior - ObjectReference (edit)
Revision as of 08:27, 16 October 2021
, 08:27, 16 October 2021no edit summary
imported>Kapteyn (→IsInInteriorActual - ObjectReference: EldergleamSanctuaryWorld (not Sancturary)) |
imported>Rasikko |
||
Line 101: | Line 101: | ||
return false | return false | ||
EndFunction </source> | EndFunction </source> | ||
== Another way == | |||
I think this can be trimmed down even further and not require while loops, arrays, and formlists. You're most definitely not in an interior cell if you're in any world space, but to keep you from having to check for DLC worldspaces, you can probably just check against whether or not you're in the Tamriel Worldspace. Don't call this on references that are in a cell that is not loaded: | |||
<source lang="papyrus"> | |||
Worldspace property Tamriel auto | |||
Bool Function isWorldSpaceInterior(ObjectReference akRef) | |||
if akRef.GetParentCell().IsInterior() == false | |||
if akRef.GetWorldSpace() != Tamriel | |||
return true | |||
endif | |||
return false | |||
endif | |||
return false | |||
EndFunction | |||
</source> --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2021-10-16T09:27:15 (EDT) |