Set value of Point() control via the console.

I'm trying to set the value of a Point() control via the console.
This code doesn't work though?
For whatever reason, this resets the value(s) back to default, but not to the specified values?
EDIT - SOLVED
I figured out after a bunch of trial and error that you need to use curly brackets instead of square brackets.
This LUA code works:
You can use the dump() function show the full table of values.
If you'd like to return a specific value you just need specify the table index
Hope this helps anybody that stumbles across this post. There doesn't seem to be any documentation on this.
This code doesn't work though?
- Code: Select all
Merge2.a.X = 0.1
Merge2.a.Y = 0.1
For whatever reason, this resets the value(s) back to default, but not to the specified values?
- Code: Select all
Merge2.a = Point(0.1, 0.1)
EDIT - SOLVED
I figured out after a bunch of trial and error that you need to use curly brackets instead of square brackets.
This LUA code works:
- Code: Select all
Merge2.a = {0.1, 0.1}
You can use the dump() function show the full table of values.
- Code: Select all
-- Returns the X,Y,Z values of 'a' on frame 0
dump(Merge2.a[0])
If you'd like to return a specific value you just need specify the table index
- Code: Select all
-- Returns X value of table 'a' on frame 0
print(Merge2.a[0][1])
-- You can also use the ".GetInput() method"
print(Merge2:GetInput("a", 0)[1])
Hope this helps anybody that stumbles across this post. There doesn't seem to be any documentation on this.