AggrorJorn Posted July 7, 2013 Posted July 7, 2013 The documentation states that it is possible to have a color picker but I haven't been able to get it working. Tried the following. Script.a = "" --color Script.b = Vec4(0,0,0,0) --color Script.c = Vec3(0,0,0) --color The particle emitter has a color picker in it so it must be possible. Quote
beo6 Posted July 7, 2013 Posted July 7, 2013 have tried it as well and i can't get it to work too. Quote
AggrorJorn Posted July 7, 2013 Author Posted July 7, 2013 Thanks for confirming. @Josh, can you move this to the bug section? Quote
shadmar Posted January 10, 2014 Posted January 10, 2014 I can't get this to work either. Nor Vec3() or Vec4() @Aggror did you ever solve this? Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
nate066 Posted January 10, 2014 Posted January 10, 2014 If i understood what your asking.heres how you create a color picker --Color Script.Cool = nil --Color --Vec3 Script.Vec3Test = nil --Vec3 Quote
shadmar Posted January 10, 2014 Posted January 10, 2014 Yes that works and your initial color will be 0,0,0,0 in the editor.... but... If you do : --Color Script.Cool = Vec4(1,1,1,1)--Color --Vec3 Script.Vec3Test = Vec3(1,0,0)--Vec3 Throws: ...: Attempt to call a non-callable object Or if you try getting the value from your first example SetColor(Vec4(Cool)) -- will result in same error Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
Tim Shea Posted January 10, 2014 Posted January 10, 2014 This worked for me, but I could never get the actual default value to function. --The Lua Script Script.MyColor = Vec3()--Color "My Color" // Retrieving the value in C++ Vec4 myColor = (Vec4)entity.getObjectA("MyColor"); Quote
shadmar Posted January 10, 2014 Posted January 10, 2014 Got it... this works : Script.MyColor = Vec3(1,1,1)--Color "My Color" .. r,g,b=self.MyColor.x,self.MyColor.y,self.MyColor.z entity:SetColor(r/255,g/255,b/255) Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
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.