Background for Fallout 4
Member of the CommonArrayFunctions script
boolfunctionCheckLocationAgainstArray(LocationObjectToCheck, Location[]ArrayToCheck, boolreturnValueIfArrayIsEmpty=false, boolmatchIfChildLocation=false)Global

Description

Wiki Description

Checks to see if the specified location is in the array, or optionally is a child of one of the locations in the array.

Documentation Comment

kmk


Caveats


Parameters

LocationObjectToCheck

CK Wiki Description

The Location we are looking for

Location[]ArrayToCheck

CK Wiki Description

The Location array we are looking in

boolreturnValueIfArrayIsEmpty=false

CK Wiki Description

If the array is empty, return this.

  • Default:False

boolmatchIfChildLocation=false

CK Wiki Description

If true, will check each location to see if ObjectToCheck is a child of the location

  • Default:False

Examples

if CommonArrayFunctions.CheckLocationAgainstArray(PlayerLocation, DiamondCityLocations, matchIfChildLocation = true)
   Debug.Trace("Player is in a diamond city location! (or a child thereof)")
endIf

Auto-Generated Example

Location myLocation__ObjectToCheck
Location[] myLocationArray__ArrayToCheck
bool myBool__returnValueIfArrayIsEmpty
bool myBool__matchIfChildLocation

bool returnedValue = CommonArrayFunctions.CheckLocationAgainstArray(myLocation__ObjectToCheck, myLocationArray__ArrayToCheck, myBool__returnValueIfArrayIsEmpty, myBool__matchIfChildLocation)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.