The Datablockdatablock WheeledVehicleData(skijumpVehicle : ballVehicle)
{
//tagged fields
doSimpleDismount = false; //just unmount the player, dont look for a free space
maxDismountDist = 0;
numMountPoints = 1;
category = "Vehicles";
shapeFile = "add-ons/Item_skis/skiVehicle.dts";
// shapeFile = "Add-ons/vehicle_jeep/jeep.dts";
emap = true;
maxDamage = 1.0;
destroyedLevel = 0.5;
maxSteeringAngle = 0.885; // Maximum steering angle, should match animation
tireEmitter = SkiEmitter; // All the tires use the same dust emitter
// 3rd person camera settings
cameraRoll = false; // Roll the camera with the vehicle?
cameraMaxDist = 7.5; // Far distance from vehicle
cameraOffset = 4.4; // Vertical offset from camera mount point
cameraLag = 0.0; // Velocity lag of camera
cameraDecay = 1.75; //0.75; // Decay per sec. rate of velocity lag
cameraTilt = 0.3201; //tilt adjustment for camera: ~20 degrees down
// Rigid Body
mass = 50; //was 90
density = 0.5;
massCenter = "0 0 0"; // Center of mass for rigid body
massBox = "1.5 1.5 1.5"; // Size of box used for moment of inertia,
// if zero it defaults to object bounding box
drag = 0.8; //was 0.8 // Drag coefficient
bodyFriction = 0.21; //was 0.21
bodyRestitution = 0.2; //was 0.2
minImpactSpeed = 0; // Impacts over this invoke the script callback
softImpactSpeed = 3; // Play SoftImpact Sound
hardImpactSpeed = 10; // Play HardImpact Sound
integration = 10; // Physics integration: TickSec/Rate
collisionTol = 0.1; // Collision distance tolerance
// contactTol = 0.000000000000000000000001; // Contact velocity tolerance
contactTol = 0.1;
isSled = false; //if its a sled, the wing surfaces dont work unless its on the ground
// Engine
engineTorque = 3500; // Engine power
engineBrake = 25; // Braking when throttle is 0
brakeTorque = 80000; // When brakes are applied
maxWheelSpeed = 30; // Engine scale by current speed / max speed
forwardThrust = 00; //500
reverseThrust = 00;
lift = 10;
maxForwardVel = 40;
maxReverseVel = 10;
horizontalSurfaceForce = 50; //50
verticalSurfaceForce = 50;
rollForce = 4000; //was 1600
yawForce = 6000; //was 1600
pitchForce = 8000; //was 1600
rotationalDrag = 1; //1
stallSpeed = 0;
steeringUseStrafeSteering = false; //this vehicle has pitch control, so we can't use strafe steering
// Energy
maxEnergy = 0;
jetForce = 0;
minJetEnergy = 30;
jetEnergyDrain = 2;
// Sounds
// jetSound = ScoutThrustSound;
//engineSound = "";
//squealSound = sprayFireSound;
//softImpactSound = Impact1ASound;
hardImpactSound = Impact1BSound;
//wheelImpactSound = Impact1BSound;
// explosion = VehicleExplosion;
speedDamageScale = 1.04;
collDamageThresholdVel = 2.0;
collDamageMultiplier = 0.02;
minRunOverSpeed = 1; //how fast you need to be going to run someone over (do damage)
runOverDamageScale = 3; //when you run over someone, speed * runoverdamagescale = damage amt
runOverPushScale = 3; //how hard a person you're running over gets pushed
};
The Vehicle mount codefunction Player::startSkiJumping(%obj)
{
//make a new ski vehicle and mount the player on it
%client = %obj.client;
%position = %obj.getTransform();
%posX = getword(%position, 0);
%posY = getword(%position, 1);
%posZ = getword(%position, 2);
%rot = getWords(%position, 3, 8);
// %obj.playthread(3,walk);
%posZ += 0.3;
%vel = %obj.getVelocity();
%newcar = new WheeledVehicle()
{
dataBlock = skijumpvehicle;
client = %client;
initialPosition = %posX @ " " @ %posY @ " " @ %posZ;
};
%newcar.setTransform(%posX @ " " @ %posY @ " " @ %posZ @ " " @ %rot);
%newcar.addVelocity("0 0 5");
%newcar.schedule(250, mountObject, %obj, 0);
%newcar.addVelocity(%vel);
}
I really have no clue why it doesn't work outside of singleplayer.