G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
Array Namespace Reference

Functions

Utilities|Array
void FilterArray (TArray< AActor > TargetArray, TSubclassOf< AActor > FilterClass, TArray< AActor > &FilteredArray)
 Filter an array based on a Class derived from Actor.
Utilities|Array|Sort
void SortFloatArray (TArray< float > &TargetArray, bool bStableSort=false, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of doubles.
void SortInt64Array (TArray< int64 > &TargetArray, bool bStableSort=false, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of 64-bit integers.
void SortIntArray (TArray< int > &TargetArray, bool bStableSort=false, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of integers.
void SortNameArray (TArray< FName > &TargetArray, bool bStableSort=false, bool bLexicalSort=true, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of FNames.
void SortStringArray (TArray< FString > &TargetArray, bool bStableSort=false, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of strings alphabetically.
void SortByteArray (TArray< uint8 > &TargetArray, bool bStableSort=false, EArraySortOrder SortOrder=EArraySortOrder ::Ascending)
 Sorts an array of bytes.

Function Documentation

◆ FilterArray()

void FilterArray ( TArray< AActor > TargetArray,
TSubclassOf< AActor > FilterClass,
TArray< AActor > & FilteredArray )

Filter an array based on a Class derived from Actor.

Parameters
TargetArrayThe array to filter from *
FilterClassThe Actor sub-class type that acts as the filter, only objects derived from it will be returned. *
Returns
An array containing only those objects which are derived from the class specified.

◆ SortByteArray()

void SortByteArray ( TArray< uint8 > & TargetArray,
bool bStableSort = false,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of bytes.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
SortOrderIf the array should be sorted in ascending or descending order.

◆ SortFloatArray()

void SortFloatArray ( TArray< float > & TargetArray,
bool bStableSort = false,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of doubles.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
SortOrderIf the array should be sorted in ascending or descending order.

◆ SortInt64Array()

void SortInt64Array ( TArray< int64 > & TargetArray,
bool bStableSort = false,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of 64-bit integers.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
SortOrderIf the array should be sorted in ascending or descending order.

◆ SortIntArray()

void SortIntArray ( TArray< int > & TargetArray,
bool bStableSort = false,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of integers.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
SortOrderIf the array should be sorted in ascending or descending order.

◆ SortNameArray()

void SortNameArray ( TArray< FName > & TargetArray,
bool bStableSort = false,
bool bLexicalSort = true,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of FNames.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
bLexicalSortIf the names should be sorted based on the string value of the name rather than the comparison index. This is slower when enabled.
SortOrderIf the array should be sorted in ascending or descending order.

◆ SortStringArray()

void SortStringArray ( TArray< FString > & TargetArray,
bool bStableSort = false,
EArraySortOrder SortOrder = EArraySortOrder :: Ascending )

Sorts an array of strings alphabetically.

Parameters
TargetArrayThe array to sort.
bStableSortIf a stable sort should be used. This preserves the order of identical elements, but is slower.
SortOrderIf the array should be sorted in ascending or descending order.