Richard Simpson Posted November 18, 2011 Share Posted November 18, 2011 I've being trying to get my car drivable inside of LE today. I have exported the body on its own, then 1 left, and right wheel as seperate meshes too. I have then copied over the driving script for ingame and also the "vehicle viperscout" script and changed the model names to match mine. I am using "vehicle" at the beginning of each mesh name also. When I try to run the driver script to drive around in-editor, I get the error: attempt to index global 'carobject' (a nil value) If I drag out my car body model into the scene I get the three following errors: Failed to open file "C:\users\richard\desktop\ leadwerks engine sdk\scripts\math.lua followed by: Failed to open file "scripts\math.lua" then: scripts/math.lua The mesh still loads in fine though. Is anyone able to point me to a tutorial or help me get a vehicle working inside LE please? I'm finding it really confusing. B) Thankyou! Quote Intel core 2 quad 6600 | Nvidia Geforce GTX460 1GB | 2GB DDR2 Ram | Windows 7. Google Sketchup | Photoshop | Blender | UU3D | Leadwerks Engine 2.4 Link to comment Share on other sites More sharing options...
macklebee Posted November 18, 2011 Share Posted November 18, 2011 The math.lua file is located at "scripts/math/math.lua" not "scripts/math.lua" in the standard SDK. So if you have a script that is calling: require("scripts/math") then it would cause this problem. Also, unless your car model has mesh heirarchy like the viperscout then the viperscout script would have to be rewritten to locate the wheel locations. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Rick Posted November 18, 2011 Share Posted November 18, 2011 A more generic vehicle script could probably be written to allow via the properties window for the user to define each of the 4 tire locations. Quote Link to comment Share on other sites More sharing options...
Richard Simpson Posted November 18, 2011 Author Share Posted November 18, 2011 Thanks Macklebee I'll give those a try. And I agree with Rick! Even just a script with the bare minimum of code to allow a working vehicle would be nice. That way, it would be easy to change things out if you are a beginner to this area, like I am. Quote Intel core 2 quad 6600 | Nvidia Geforce GTX460 1GB | 2GB DDR2 Ram | Windows 7. Google Sketchup | Photoshop | Blender | UU3D | Leadwerks Engine 2.4 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.