randomkeyhits Posted November 22, 2014 Share Posted November 22, 2014 When I use --Vec2/3/4 for script arguments (I want nice neat input tables) the default value of the first element is always over-ridden and set to 0.0 Script.TestThis = { 1.0, 2.0, 3.0, 4.0 } -- Vec4 "testing" Will offer up 0.0 2.0 3.0 and 4.0 as the default values. Same behaviour with Vec2 and Vec3 Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
shadmar Posted November 22, 2014 Share Posted November 22, 2014 Try Script.TestThis = Vec4(1.0, 2.0, 3.0, 4.0)-- Vec4 "testing" Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
randomkeyhits Posted November 22, 2014 Author Share Posted November 22, 2014 Yes, that works. I need more scripting practise.... edit : more than I realised. I've this at the start of the code -- create the zoom array Script.Steps = {} Script.Steps[1] = Vec4(1.0, 45.0, -30.0, 10.0 ) --Vec4 "Zoom 01" Script.Steps[2] = Vec4(2.0, 45.0, -30.0, 10.0 ) --Vec4 "Zoom 02" Script.Steps[3] = Vec4(3.0, 45.0, -30.0, 10.0 ) --Vec4 "Zoom 03" Script.Steps[4] = Vec4(4.0, 45.0, -30.0, 10.0 ) --Vec4 "Zoom 04" ..... When I read the results later in the script local distance = self.Steps[offset].x no matter what I set the args to in the panel it always gives me the preset values. Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
beo6 Posted December 3, 2014 Share Posted December 3, 2014 It does probably not work with tables. But you should be able to assign the values later to a table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.