Difference between revisions of "Location Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
(Added GetParent SKSE function)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Line 19: Line 15:


== Member Functions ==
== Member Functions ==
*float Function [[GetKeywordData - Location|GetKeywordData]](Keyword akKeyword)
 
**Returns the float value associated with the specified keyword attached to this location.
:'''Float [[GetKeywordData - Location|GetKeywordData]](Keyword ''akKeyword'')'''
*int Function [[GetRefTypeAliveCount - Location|GetRefTypeAliveCount]](LocationRefType akRefType)
:*Returns the float value associated with the specified keyword attached to this location.
**Returns the number of alive enabled references matching the specified [[LocationRefType Script|LocationRefType]].
 
*int Function [[GetRefTypeDeadCount - Location|GetRefTypeDeadCount]](LocationRefType akRefType)
:'''Int [[GetRefTypeAliveCount - Location|GetRefTypeAliveCount]](LocationRefType ''akRefType'')'''
**Returns the number of dead enabled references matching the specified [[LocationRefType Script|LocationRefType]].
:*Returns the number of alive enabled references matching the specified [[LocationRefType Script|LocationRefType]].
*bool Function [[HasCommonParent - Location|HasCommonParent]](Location akOther, Keyword akFilter)
 
**Returns if the two locations have a common parent, filtered with the [[Keyword Script|Keyword]].
:'''Int [[GetRefTypeDeadCount - Location|GetRefTypeDeadCount]](LocationRefType ''akRefType'')'''
*bool Function [[HasRefType - Location|HasRefType]](LocationRefType akRefType)
:*Returns the number of dead enabled references matching the specified [[LocationRefType Script|LocationRefType]].
**Returns if this location has the specified [[LocationRefType Script|LocationRefType]]
 
*bool Function [[IsCleared - Location|IsCleared]]()
:'''Bool [[HasCommonParent - Location|HasCommonParent]](Location ''akOther'', Keyword ''akFilter'')'''
**Gets whether this location is flagged as "cleared" or not.
:*Returns if the two locations have a common parent, filtered with the [[Keyword Script|Keyword]].
*bool Function [[IsChild - Location|IsChild]](Location akOther)
 
**Checks to see if the other location is a child of this one.
:'''Bool [[HasRefType - Location|HasRefType]](LocationRefType ''akRefType'')'''
*bool Function [[IsLoaded - Location|IsLoaded]]()
:*Returns if this location has the specified [[LocationRefType Script|LocationRefType]]
**Is this location currently loaded?
 
*bool Function [[IsSameLocation - Location|IsSameLocation]](Location akOtherLocation, Keyword akKeyword)
:'''Bool [[IsCleared - Location|IsCleared]]()'''
**Returns true if this location is the same as the supplied location
:*Gets whether this location is flagged as "cleared" or not.
*Function [[SetCleared - Location|SetCleared]](bool abCleared)
 
**Flags this location as cleared (or not).
:'''Bool [[IsChild - Location|IsChild]](Location ''akOther'')'''
*Function [[SetKeywordData - Location|SetKeywordData]](Keyword akKeyword, float afData)
:*Checks to see if the other location is a child of this one.
**Sets the specified [[Keyword Script|Keyword]]'s data on this location.
 
:'''Bool [[IsLoaded - Location|IsLoaded]]()'''
:*Is this location currently loaded?
 
:'''Bool [[IsSameLocation - Location|IsSameLocation]](Location ''akOtherLocation'', Keyword ''akKeyword'')'''
:*Returns true if this location is the same as the supplied location
 
:'''[[SetCleared - Location|SetCleared]](Bool ''abCleared'')'''
:*Flags this location as cleared (or not).
 
:'''[[SetKeywordData - Location|SetKeywordData]](Keyword ''akKeyword'', Float ''afData'')'''
:*Sets the specified [[Keyword Script|Keyword]]'s data on this location.
 
== SKSE Member Functions ==
 
:'''Location [[GetParent - Location|GetParent]]()
:*Gets the parent Location of this Location (inferred from name).


== Events ==
== Events ==
None
None
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]

Latest revision as of 03:32, 3 December 2021

Extends: Form Script

Script for the manipulation of location base objects.

Definition[edit | edit source]

ScriptName Location extends Form

Properties[edit | edit source]

None

Global Functions[edit | edit source]

None

Member Functions[edit | edit source]

Float GetKeywordData(Keyword akKeyword)
  • Returns the float value associated with the specified keyword attached to this location.
Int GetRefTypeAliveCount(LocationRefType akRefType)
  • Returns the number of alive enabled references matching the specified LocationRefType.
Int GetRefTypeDeadCount(LocationRefType akRefType)
  • Returns the number of dead enabled references matching the specified LocationRefType.
Bool HasCommonParent(Location akOther, Keyword akFilter)
  • Returns if the two locations have a common parent, filtered with the Keyword.
Bool HasRefType(LocationRefType akRefType)
Bool IsCleared()
  • Gets whether this location is flagged as "cleared" or not.
Bool IsChild(Location akOther)
  • Checks to see if the other location is a child of this one.
Bool IsLoaded()
  • Is this location currently loaded?
Bool IsSameLocation(Location akOtherLocation, Keyword akKeyword)
  • Returns true if this location is the same as the supplied location
SetCleared(Bool abCleared)
  • Flags this location as cleared (or not).
SetKeywordData(Keyword akKeyword, Float afData)
  • Sets the specified Keyword's data on this location.

SKSE Member Functions[edit | edit source]

Location GetParent()
  • Gets the parent Location of this Location (inferred from name).

Events[edit | edit source]

None