[Help] Vehicle Code error

Making or wanting help making your own asset? Check in here
Post Reply
HangMan_
Posts: 1753
Joined: 2009-06-07 00:58

[Help] Vehicle Code error

Post 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
Image

PR Community Faction Team - "Getting Sh*t Done..."
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: [Help] Vehicle Code error

Post 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
Image
HangMan_
Posts: 1753
Joined: 2009-06-07 00:58

Re: [Help] Vehicle Code error

Post by HangMan_ »

got some help from AM and now its fixed :D
Image

PR Community Faction Team - "Getting Sh*t Done..."
AfterDune
Retired PR Developer
Posts: 17094
Joined: 2007-02-08 07:19

Re: [Help] Vehicle Code error

Post by AfterDune »

Please post the solution, might help others ;) .
Image
HangMan_
Posts: 1753
Joined: 2009-06-07 00:58

Re: [Help] Vehicle Code error

Post 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.
Image

PR Community Faction Team - "Getting Sh*t Done..."
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: [Help] Vehicle Code error

Post 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
Image
Post Reply

Return to “PR:BF2 Community Modding”