...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
velocity_vector = Vector.new(1.0, 1.0, 1.0) scene.setGlobalVariableValue("velocity", velocity_vector) new_velocity = scene.getGlobalVariableValue("velocity") new_velocity_yscale = new_velocity.getYmodule() scene.message(str(new_velocity_yscale)) |
Another way to use velocity_vector
with a global variable is to write it directly to the definition without introducing a local variable first:
...