CreateBoolArray - Utility
Jump to navigation
Jump to search
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.
Syntax[edit | edit source]
Bool[] Function CreateBoolArray(Int size, Bool fill = False) Native
Parameters[edit | edit source]
- 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 Value[edit | edit source]
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.
Examples[edit | edit source]
Bool[] myArray = Utility.CreateBoolArray(129) ; Create an array longer than the Papyrus compiler would allow
Notes[edit | edit source]
- 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.