Author Topic: Can't rework HandsOnVehicle_Support for vehicles!  (Read 739 times)

 Hey, ever since i've been back to BL, I've been recoding a lot of Filipe's old vehicles, I set ALL to have the same physics and speed configurations as the "Club"
I now want players and bots inside the drivers seat to use HandsOnVehicle I typed the code in right on the .cs files and even exported the datablock and it still won't show up on the club. Any ideas how to fix? I noticed my hands disappear on the club so it's partially working. This is for my City Simulator..

you need to give us your code

you need to give us your code

Server.cs
"//we need the jeep add-on for this, so force it to load
%error = ForceRequiredAddOn("Vehicle_Jeep");

if(%error == $Error::AddOn_Disabled)
{
   //A bit of a hack:
   //  we just forced the jeep to load, but the user had it disabled
   //  so lets make it so they can't select it
   JeepVehicle.uiName = "";
}

if(%error == $Error::AddOn_NotFound)
{
   //we don't have the jeep, so we're screwed
   error("ERROR: Vehicle_Club - required add-on Vehicle_Jeep not found");
}
else
{
   exec("./Vehicle_Club.cs");
   exec("./Club_Tire.cs");
   exec("./Club_Explosion.cs");
   exec("./Club_FinalExplosion.cs");
   exec("./Club_Spring.cs");  
                exec("./Support_HandsOnVehicle.cs");  
}"

Club.cs
"datablock WheeledVehicleData(ClubVehicle)
{
   category = "Vehicles";
   displayName = " ";
   shapeFile = "./Club.dts"; //"~/data/shapes/skivehicle.dts"; //
   emap = true;
   minMountDist = 3;
  
   numMountPoints = 4;
   mountThread[0] = "sit";
   mountThread[1] = "sit";
   mountThread[2] = "sit";
   mountThread[3] = "sit";

   maxDamage = 200.00;
   destroyedLevel = 200.00;
   energyPerDamagePoint = 160;
   speedDamageScale = 1.04;
   collDamageThresholdVel = 20.0;
   collDamageMultiplier   = 0.02;

   massCenter = "0 0 0.4";
   //massBox = "2 5 1";

   maxSteeringAngle = 0.84;  // Maximum steering angle, should match animation
   integration = 4;           // Force integration time: TickSec/Rate
   tireEmitter = VehicleTireEmitter; // All the tires use the same dust emitter

   // 3rd person camera settings
   cameraRoll = false;         // Roll the camera with the vehicle
   cameraMaxDist = 11;         // Far distance from vehicle
   cameraOffset = 7.5;        // Vertical offset from camera mount point
   cameraLag = 0.0;           // Velocity lag of camera
   cameraDecay = 0.75;        // Decay per sec. rate of velocity lag
   cameraTilt = 0.4;
   collisionTol = 0.1;        // Collision distance tolerance
   contactTol = 0.1;

   useEyePoint = false;   

   defaultTire   = ClubTire;
   defaultSpring   = ClubSpring;
   flatTire   = jeepFlatTire;
   flatSpring   = jeepFlatSpring;

   numWheels = 4;

   // Rigid Body
   mass = 300;
   density = 5.0;
   drag = 1.6;
   bodyFriction = 0.6;
   bodyRestitution = 0.6;
   minImpactSpeed = 10;        // Impacts over this invoke the script callback
   softImpactSpeed = 10;       // Play SoftImpact Sound
   hardImpactSpeed = 15;      // Play HardImpact Sound
   groundImpactMinSpeed    = 10.0;

   // Engine
   engineTorque = 14000; //4000;       // Engine power
   engineBrake = 5000;         // Braking when throttle is 0
   brakeTorque = 8000;        // When brakes are applied
   maxWheelSpeed = 35;        // Engine scale by current speed / max speed

"
« Last Edit: June 22, 2016, 04:13:34 PM by Death The Kid »

Hello? Been waiting for hours. I need to work on the other vehicles with the same code.

I told you already the model of the vehicle has to be edited to include the hands, but since it's an old add-on I don't have it's model files anymore to add the hands in.

I am sorry i look a lot at the forums, but not 24/7. ;)
Either you cut off the datablock code of the club before the following line:
Code: [Select]
handsOnVehicle = 1;
Or you forgot to put that in the datablock of the vehicle. :)
Please make sure this is the case, the rest should be fine as long as you have the nodes with the right names on your vehicle model.

I am going offline for like over 12 hours now, hope this helped and everything will work.
But please, have some patience, you cannot always expect an answer straight away.
Some people don't even get an answer. :/

EDIT:
I told you already the model of the vehicle has to be edited to include the hands, but since it's an old add-on I don't have it's model files anymore to add the hands in.
Ah, yeah that is gonna be a problem.
« Last Edit: June 22, 2016, 06:33:24 PM by lordician »