Rick Posted December 31, 2011 Posted December 31, 2011 Making a model script where I have a setting in the properties dialog defined as: group:AddProperty("bgcolor", PROPERTY_COLOR, "1", "BG Color") Inside object:SetKey() I have it defined as: elseif key == "bgcolor" then self.bgColor = StringToColor(value) Notify(self.bgColor.w) The alpha is always 0 for me. I'm looking at the environment_atmosphere script to see how it does it and I can't see what I'm doing wrong. w is always 1 for that script. In the properties dialog when you define as PROPERTY_COLOR it only gives you 3 boxes for r,g,b and no place for the alpha so not sure how that's working. I've been coding all day for I'm sure my eyes and brain just aren't connecting something Quote
macklebee Posted December 31, 2011 Posted December 31, 2011 what do you have for the object:GetKey() function? and something is wrong because PROPERTY_COLOR gives four boxes plus a color button to open up the colorpicker dialog... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
Rick Posted December 31, 2011 Author Posted December 31, 2011 I didn't have anything, but after copying the atmosphere GetKey() it worked. So why is that needed? The other values were fine without having anything in GetKey(). Is this a cork of the PROPERTY_COLOR? and something is wrong because PROPERTY_COLOR gives four boxes plus a color button to open up the colorpicker dialog... Now it's showing 4. Aw bugger I swear it was only showing 3. I'll have to see if there was some scenario that caused that. Thanks for the help. [edit] Sometimes it's 3 and sometimes it's 4 it seems Quote
macklebee Posted January 4, 2012 Posted January 4, 2012 the difference to getting 3 or 4 boxes is one of the parameters.. PROPERTY_COLOR Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
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.