![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Moot Point |
![]() |
Reply From: | jgodfrey |
AFAIK, there’s no built-in way to assign a single value to every element in an array. But, you can easily do that with a helper function. Here’s an example…
func _ready():
var boolArray = [true, true, true, false, false]
print(boolArray)
set_bool_array(boolArray, false)
print(boolArray)
func set_bool_array(array, value):
for i in range(0, array.size()):
array[i] = value