CheckLocationAgainstLocationAliasArray - CommonArrayFunctions
Jump to navigation
Jump to search
Member of: CommonArrayFunctions Script
Loops through an array of location aliases and checks if the specified location in in any of them. (Or a child of one of them if matchIfChildLocation)
Syntax[edit | edit source]
bool Function CheckLocationAgainstLocationAliasArray(Location ObjectToCheck, LocationAlias[] ArrayToCheck, \
bool returnValueIfArrayIsEmpty = false, bool matchIfChildLocation = false) global
Parameters[edit | edit source]
- ObjectToCheck: The Location we are looking for
- ArrayToCheck: The LocationAlias array we are looking in
- returnValueIfArrayIsEmpty: If the array is empty, return this.
- Default: False
- matchIfChildLocation: If true, the location will match if it is a child of a location in an alias.
- Default: False
Return Value[edit | edit source]
- True: If the ObjectToCheck is in one of the location aliases in ArrayToCheck (or a child, if matchIfChildLocation)
- False: If the ObjectToCheck is not in one of the location aliases in ArrayToCheck (and not a child, if matchIfChildLocation)
- False: If ObjectToCheck is None
- returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None
Examples[edit | edit source]
if CommonArrayFunctions.CheckLocationAgainstLocationAliasArray(PlayerLocation, QuestLocationAliases)
Debug.Trace("The player is in one of the quest locations! (But not a child location)")
endIf