CreateBoolArray - Utility
Member of: Utility Script
Creates an array of Bool values, with the specified length. Be careful when using this function. It is possible to create arrays longer than 128 elements, and size is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.
SyntaxEdit
Bool[] Function CreateBoolArray(Int size, Bool fill = False) Native
ParametersEdit
- size: The length of the array.
- fill: Unused due to a bug in SKSE. The intention was for each array in the element to be set to this value.
Return ValueEdit
A Bool array of length size. The elements in the array will most likely be True, but there is no guarantee that they will have any particular value.
ExamplesEdit
Bool[] myArray = Utility.CreateBoolArray(129) ; Create an array longer than the Papyrus compiler would allow
NotesEdit
- As mentioned above, an SKSE bug means that the contents of the array — the values of the bools — are effectively random. This bug should not affect the functions that create arrays of other types. Refer to the Talk page for more details.