GetInCurrentLoc

From the CreationKit Wiki
Revision as of 22:35, 21 November 2023 by Jadkai (talk | contribs) (Add my findings about the behavior of GetInCurrentLoc when filling aliases, specifically that a reference's current and persistence location are both considered.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description[edit | edit source]

GetInCurrentLoc returns 1 if the reference's current location is (or has a parent location of) the supplied location. If run on a location, returns 1 if the parent of the location is (or has a parent location of) the supplied location.

When you use GetInCurrentLoc to fill a Reference Alias, be aware that a reference's current actual location as well as its persistence location, if it has one, will be considered.

For example, if an Actor is currently in Markarth but has a persistence location of WhiterunLocation, then GetInCurrentLoc WhiterunLocation will match the Actor, even though the Actor is actually in Markarth.

Syntax[edit | edit source]

[ObjectREF].GetInCurrentLoc Location

Examples[edit | edit source]

player.GetInCurrentLoc WhiterunLocation   ;returns true if player is in WhiterunLocation or in a location that has WhiterunLocation as a parent.

See Also[edit | edit source]

Papyrus Functions[edit | edit source]