datablock WheeledVehicleData(CitiMk2Vehicle){ isCustom=1; type="CitiMk2"; uiName = "Citi Mk2"; shapeFile = "./CitiMk2.dts"; category = "Vehicles"; displayName = " "; 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.6"; //massBox = "2 5 1"; maxSteeringAngle = 0.7; // 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 = 8.5; // Far distance from vehicle cameraOffset = 3.4; // 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.2; collisionTol = 0.1; // Collision distance tolerance contactTol = 0.1; useEyePoint = false; defaultTire = CitiMk2Tire; defaultSpring = CitiMk2Spring; flatTire = jeepFlatTire; flatSpring = jeepFlatSpring; numWheels = 4; // Rigid Body mass = 200; density = 5.0; drag = 4.5; 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 = 2400; //teneksi 3000; //4000; // Engine power engineBrake = 600; //teneksi 700; // Braking when throttle is 0 brakeTorque = 2000; //teneksi 3200; // When brakes are applied maxWheelSpeed = 37; //teneksi 42; // Engine scale by current speed / max speed rollForce = 900; yawForce = 600; pitchForce = 1000; rotationalDrag = 0; // Advanced Steering steeringAutoReturn = true; steeringAutoReturnRate = 1; steeringAutoReturnMaxSpeed = 10; steeringUseStrafeSteering = true; steeringStrafeSteeringRate = 0.08; // Energy maxEnergy = 100; jetForce = 3000; minJetEnergy = 30; jetEnergyDrain = 2; splash = jeepSplash; splashVelocity = 4.0; splashAngle = 67.0; splashFreqMod = 300.0; splashVelEpsilon = 0.60; bubbleEmitTime = 1.4; splashEmitter[0] = VehicleFoamDropletsEmitter; splashEmitter[1] = VehicleFoamEmitter; splashEmitter[2] = VehicleBubbleEmitter; mediumSplashSoundVelocity = 10.0; hardSplashSoundVelocity = 20.0; exitSplashSoundVelocity = 5.0; //mediumSplashSound = ""; //hardSplashSound = ""; //exitSplashSound = ""; // Sounds // jetSound = ScoutThrustSound; //engineSound = idleSound; //squealSound = skidSound; softImpactSound = SlowImpactSound; hardImpactSound = FastImpactSound; //wheelImpactSound = slowImpactSound; // explosion = VehicleExplosion; justcollided = 0; rideable = true; lookUpLimit = 0.50; lookDownLimit = 0.50; paintable = true; damageEmitter[0] = VehicleBurnEmitter; damageEmitterOffset[0] = "0.0 0.0 0.0 "; damageLevelTolerance[0] = 0.99; damageEmitter[1] = VehicleBurnEmitter; damageEmitterOffset[1] = "0.0 0.0 0.0 "; damageLevelTolerance[1] = 1.0; handsOnVehicle = 1; numDmgEmitterAreas = 1; initialExplosionProjectile = CitiMk2ExplosionProjectile; initialExplosionOffset = 0; //offset only uses a z value for now burnTime = 4000; finalExplosionProjectile = CitiMk2FinalExplosionProjecti le; finalExplosionOffset = 0.5; //offset only uses a z value for now minRunOverSpeed = 2; //how fast you need to be going to run someone over (do damage) runOverDamageScale = 5; //when you run over someone, speed * runoverdamagescale = damage amt runOverPushScale = 1.2; //how hard a person you're running over gets pushed};Garage_AddParts("add-ons/Vehicle_CitiMk2/CitiMk2.txt");function CitiMk2Vehicle::onAdd(%this,%obj){ Parent::onAdd(%this,%obj); %obj.playthread(0,"propslow"); %obj.hideNode(lhand); %obj.hideNode(rhand); %obj.hideNode(lhook); %obj.hideNode(rhook); %obj.setWheelPowered(0, true ); %obj.setWheelPowered(1, true ); %obj.setWheelPowered(2, false ); %obj.setWheelPowered(3, false ); %obj.schedule(0,garageDefault);}
Remove the spaces surrounding the words true and false, like this.%obj.setWheelPowered(0,true); %obj.setWheelPowered(1,true); %obj.setWheelPowered(2,false); %obj.setWheelPowered(3,false);
this isnt necessary afaik
this isnt necessary afaikhow is it not working? can you clarify what isnt working? can the vehicle drive at all?
Shouldn't you switch %obj to %this?
make sure that function is in a packageif that isn't relevant, try %obj.setWheelPowered(0, 1);and so onalso get rid of forgetin' %obj.playthread(0,"propslow"); what is that still doing there? that's for a plane. I'm betting the car has no such sequence.
function CitiMk2Vehicle::onAdd(%this,%obj){ Parent::onAdd(%this,%obj); %obj.setWheelPowered(2, 0); %obj.setWheelPowered(3, 0); %obj.hideNode(lhand); %obj.hideNode(rhand); %obj.hideNode(lhook); %obj.hideNode(rhook); %obj.schedule(0,garageDefault);}
do you completely restart BL when you make these changes? you need to if you do changes to a .zip file
setModPaths(getModPaths());
Code: [Select]setModPaths(getModPaths());