Message 1 of 9
expression_controller basic help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm going in circles on this one. Would someone demonstration how to put an expression controller together, please?
I've been trying to get a variable to change according to the relative positions of two objects. Currently playing with the idea of using a float_expression or float_script... don't know if this is even a viable approach. But it turns out that's begging the question; I can't even figure out how to properly construct an expression controller, despite poring over all the Reference stuff I've got. When I try (don't laugh)...
I get Unknown property: "SetExpression" in Controller:Float_Expression. Any guidance would be greatly appreciated. Thanks.
I've been trying to get a variable to change according to the relative positions of two objects. Currently playing with the idea of using a float_expression or float_script... don't know if this is even a viable approach. But it turns out that's begging the question; I can't even figure out how to properly construct an expression controller, despite poring over all the Reference stuff I've got. When I try (don't laugh)...
)
b1 = box()
2 = box pos:
local a = 1
fx = b1.position.controller = float_expression
fx.SetExpression = "if (b1.pos.y > b2.pos.y) then v = 2 else v = 1"
)
I get Unknown property: "SetExpression" in Controller:Float_Expression. Any guidance would be greatly appreciated. Thanks.