What I mean is, is there any harm in me using something like
instead of
?
My variable is actually an array, and I only want to change one part of it. Say, my array is [1, 2, 3] and I want to change the 1 to a 5. I can use
which seems to work fine, but I was wondering if bypassing setValue could cause issues.
I suppose I could do something like
is setValue is required...
Code:
$gameVariables.value(1) = 10
Code:
$gameVariables.setValue(1, 10)
My variable is actually an array, and I only want to change one part of it. Say, my array is [1, 2, 3] and I want to change the 1 to a 5. I can use
Code:
$gameVariables.value(1)[0] = 5
I suppose I could do something like
Code:
$gameVariables.setValue(1, [5, ...$gameVariables.value(1).slice(1)])