Yue Posted August 3, 2020 Share Posted August 3, 2020 I don't have the result I expect. Any suggestions? Leadwerks Editor 4.6 - G__Astrocuco_Astrocuco_Maps_Marte.map 2020-08-03 16-28-35.mp4 Quote Link to comment Share on other sites More sharing options...
havenphillip Posted August 3, 2020 Share Posted August 3, 2020 I think you need " Script.cameraPlayer = entity " ? Quote Link to comment Share on other sites More sharing options...
Yue Posted August 4, 2020 Author Share Posted August 4, 2020 https://www.leadwerks.com/learn?page=Tutorials_Lua-Scripting_Script-Properties I think that's fine, that's what it says in the entity tutorial, you can put nil. Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted August 4, 2020 Share Posted August 4, 2020 I had a similar problem but I don't know if its the same as yours. In my script I was assigning the screen width to a script variable ( Script.ScreenWidth = context:GetWidth() ). In the Start function I would try and retrieve the screen width with Self.ScreenWidth and it would say it was nil value. Even thou I had given it a value outside of the "start" function. I didn't investigate it too much as I have been playing with the LW beta. Maybe this is also the cause of your problem. Quote Link to comment Share on other sites More sharing options...
havenphillip Posted August 4, 2020 Share Posted August 4, 2020 Idk the only other thing I can think is maybe it has something to do with the script you're importing. Other than that maybe you can try putting your System:Print() line under the UpdateWorld() function also. Quote Link to comment Share on other sites More sharing options...
Solution Yue Posted August 24, 2020 Author Solution Share Posted August 24, 2020 I have solved this problem, this is very painful because when this happens, motivation is lost and the project can go to hell. The solution if this happens to you is the following. Remove the entity that has the script hooked up that shows the error, then put it back in and assign the script again and the problem is solved. 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.