Page 1 of 1

[Help] Vehicle Code error

Posted: 2010-01-21 10:39
by HangMan_
Get this error at 100% loading on a custom map, has a custom vehicle in it which is the reason for the crash. Vehicle is a variant of the usjep_hmmwvm2, don't think i coded it right so how do i fix this error?

Image

All help appreciated :D

HangMan

Re: [Help] Vehicle Code error

Posted: 2010-01-21 11:20
by Amok@ndy
you need to rename the vehicle !
i had this issue before and J.F.Leusch told me to rename the vehicle and then it worked

Re: [Help] Vehicle Code error

Posted: 2010-01-21 11:37
by HangMan_
got some help from AM and now its fixed :D

Re: [Help] Vehicle Code error

Posted: 2010-01-21 11:44
by AfterDune
Please post the solution, might help others ;) .

Re: [Help] Vehicle Code error

Posted: 2010-01-21 11:50
by HangMan_
Ok no worries. So when duplicating the .con's and .tweaks of a vehicle like i did you have to rename all the original names within the files, except for the collision mesh code, geometry code, and AI code. So pretty much when i changed the name to usjep_hmmwvm2a i had to go through the .con and .tweak and replace all the usjep_hmmwvm2 with usjep_hmmwvm2a. You do not change the collision mesh code or the geometry code or the AI code though or it will either cause CTD or just not load the vehicle.

In the .con don't change the code lines that starts with:
GeometryTemplate.create BundledMesh
CollisionManager.createTemplate

In the .tweak don't change the code lines that starts with:
ObjectTemplate.geometry
ObjectTemplate.setCollisionMesh
ObjectTemplate.aiTemplate


Also rename the .con file and the .tweak file, you might want to put them in their own folder aswell :)

Thank you very much to [R-DEV]AncientMan for explaining this to me.

Re: [Help] Vehicle Code error

Posted: 2010-01-25 15:09
by Amok@ndy
the easiest way is to use Ctrl + H and then type "vehicleA" (just a sample) replace with "vehicleB"
then type "/vehicleB" replace with "/vehicleA" to make sure the sounds paths else are correct

thats the way i always do