Jump to content

how to succesfully import your own drivable vehicle?


Richard Simpson
 Share

Recommended Posts

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!

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

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.

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

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. :D

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...