...
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:
...
This way of introducing global variables is also valid, but it is better to stay with RealFlow’s internal method, because it is tailored to its special requirements.