Yue Posted August 17, 2017 Share Posted August 17, 2017 What am I doing wrong? self.entity:SetFogMode(true) Perfect, Fogo color White. Error on self.entity:SetFogColor( 0, 0, 0 ) Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted August 17, 2017 Share Posted August 17, 2017 Is your script attached to a camera? Quote Link to comment Share on other sites More sharing options...
Yue Posted August 17, 2017 Author Share Posted August 17, 2017 6 minutes ago, Thirsty Panther said: Is your script attached to a camera? Yes, attach script file to camera. Quote Link to comment Share on other sites More sharing options...
Solution Ma-Shell Posted August 17, 2017 Solution Share Posted August 17, 2017 The error message tells you that you're missing a fourth argument (#5, because "self.entity" is implicitly #1 and r,g,b are #2, #3, #4), which should be a number! Looking at the documentation (https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_SetFogColor), you can see that there is also an alpha-value expected. 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted August 17, 2017 Author Share Posted August 17, 2017 2 minutes ago, Ma-Shell said: The error message tells you that you're missing a fourth argument (#5, because "self.entity" is implicitly #1 and r,g,b are #2, #3, #4), which should be a number! Looking at the documentation (https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_SetFogColor), you can see that there is also an alpha-value expected. Thanks You. self.entity:SetFogColor(0.941, 0.756, 0.537, 1 ) 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.