Author Topic: Player mount point - Vehicles?  (Read 3096 times)

I'm thinking about making a vehicle of some sort, but I'm kinda stepping into unknown territory for myself.

How exactly do I set were the player is mounted on the vehicle? Does it work the same as   mountPoint for weapons? Or is it somthing thats automatic?

Edit: Also, what about wheels? Do I make them and animate them? Or is it built in?

Hope fully this'll show you that i'm a good overall scripter for [P] :D.
When modeling
Make the joints where you want the player to mount (more if you want more then 1 person) and name them;
mount0 (driver)
mount1
etc etc for every mount you've made, in order of which you want them to be mounted.
For the wheels(Make all the spots you wat the wheels to go;
hub 0 (left front I think)
hub 1
etc, etc, etc.
Scipting
Now just make the vehicle data (Copy and paste from other vehicles if your unsure how to do it)
then on the Vehicle::onAdd function make it mount all the wheels to the hub points and set the springs. If this is not enough scripting help, tell me and I'll put up a default script you can change.

Somethings gone wrong when I tested the model on the jeep script.
The problem is probably something obvious, but I'm tried and really have no idea what I'm doing :3

Edit: I'll read all responses in the morning, I REALLY need some sleep.

Code: [Select]
setWheelTire: wheel index out of bounds, vehicle has 13386375 hubs
setWheelSpring: wheel index out of bounds, vehicle has 13386375 hubs
setWheelTire: wheel index out of bounds, vehicle has 13386375 hubs
setWheelSpring: wheel index out of bounds, vehicle has 13386375 hubs
setWheelTire: wheel index out of bounds, vehicle has 13386375 hubs
setWheelSpring: wheel index out of bounds, vehicle has 133863

« Last Edit: April 27, 2008, 11:20:07 AM by Boltster »

Code: [Select]
hub0
hub2
hub3
hub4

should be
Code: [Select]
hub0
hub1
hub2
hub3

probably.

Well thats one problem down, but It still crashes blockland, and this pops up in the console

Code: [Select]
setWheelSteering: wheel index out of bounds, vehicle has 13386375 hubs
setWheelSteering: wheel index out of bounds, vehicle has 13386375 hubs
setWheelPowered: wheel index out of bounds, vehicle has 13386375 hubs

Anything I'm missing to see/add?

Bump because I really want to fix this.

When you export, ether check Collision Box, or before you export spawn a box then cover the area that you want as the collision and call the model group "collision" with out quotes, then export (Check Collision mesh) then try.

My bad it looks as thought retail auto assorts the wheels when its created (Some sort of engine upgrade)
Code: [Select]
defaultTire = vehicleTire;
defaultSpring = vehicleSpring;

   numWheels = 4;

It's always been like this, And as far as I know, the numWheels variable has no actual bearing on how many wheels the vehicle will be given (although it does in V9)

Open up your dts model in a text document and search for "hub0" and make sure it actually exported from whatever you use.

I just noticed, its hub0 not hub 0.

Yeh, I had changed that before.

Its not crashing anymore, but I still have 2 problems.

1.Its only flatshading SOME of the model.
2.There are no tires O_o

I'm still testing it on the jeep script.



Yeh, I had changed that before.

Its not crashing anymore, but I still have 2 problems.

1.Its only flatshading SOME of the model.
2.There are no tires O_o

I'm still testing it on the jeep script.
We all get that problem, very annoying and I'm going to suggest some thing to the maker of MS3D.