| Archive > Mapping Help |
| Motor Scooter Help |
| (1/1) |
| Edmund:
Im making a vehicle called the Motor Scooter and I got all the stuff to package, and all that good stuff. But when I scripted it and checked on Blockland the tires for the care were missing. This is the script I used Can you spot anything wrong? :o --- Code: ---//exec("add-ons/vehicle_MotorScooter.cs"); //----------------------------------------------------------------------------- // Information extacted from the shape. // // Wheel Sequences // spring# Wheel spring motion: time 0 = wheel fully extended, // the hub must be displaced, but not directly animated // as it will be rotated in code. // Other Sequences // steering Wheel steering: time 0 = full right, 0.5 = center // breakLight Break light, time 0 = off, 1 = breaking // // Wheel Nodes // hub# Wheel hub, the hub must be in it's upper position // from which the springs are mounted. // // The steering and animation sequences are optional. // The center of the shape acts as the center of mass for the car. //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- datablock WheeledVehicleTire(MotorScootertire) { // Tires act as springs and generate lateral and longitudinal // forces to move the vehicle. These distortion/spring forces // are what convert wheel angular velocity into forces that // act on the rigid body. shapeFile = "./MotorScootertire.dts"; mass = 50; radius = 1; staticFriction = 5; kineticFriction = 5; restitution = 0.5; // Spring that generates lateral tire forces lateralForce = 18000; lateralDamping = 4000; lateralRelaxation = 0.01; // Spring that generates longitudinal tire forces longitudinalForce = 14000; longitudinalDamping = 2000; longitudinalRelaxation = 0.01; }; datablock WheeledVehicleSpring(MotorScooterSpring) { // Wheel suspension properties length = 0.3; // Suspension travel force = 3000; //3000; // Spring force damping = 600; //600; // Spring damping antiSwayForce = 3; //3; // Lateral anti-sway force }; datablock WheeledVehicleData(MotorScooterVehicle) { category = "Vehicles"; displayName = " "; shapeFile = "./MotorScooter.dts"; //"~/data/shapes/skivehicle.dts"; // emap = true; minMountDist = 3; numMountPoints = 1; mountThread[0] = "root"; maxDamage = 200.00; destroyedLevel = 200.00; energyPerDamagePoint = 160; speedDamageScale = 1.04; collDamageThresholdVel = 20.0; collDamageMultiplier = 0.02; massCenter = "0 -1 -1"; //massBox = "0 0 0"; maxSteeringAngle = 0.6; // 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 = 13; // 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 = MotorScootertire; // defaultSpring = MotorScooterSpring; // flatTire = MotorScooterFlatTire; // flatSpring = MotorScooterFlatSpring; //numWheels = 4; steeringAutoReturn = false; steeringAutoReturnRate = 0.9; steeringAutoReturnMaxSpeed = 10; steeringUseStrafeSteering = true; steeringStrafeSteeringRate = 0.2; // Rigid Body mass = 225; density = 5.0; drag = 4.0; 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 = 30000; //4000; // Engine power engineBrake = 6000; // Braking when throttle is 0 brakeTorque = 8000; // When brakes are applied maxWheelSpeed = 40; // Engine scale by current speed / max speed rollForce = 0; //900; yawForce = 0; //600; pitchForce = 1000; //1000; rotationalDrag = 30; // Energy maxEnergy = 100; jetForce = 3000; minJetEnergy = 30; jetEnergyDrain = 2; splash = vehicleSplash; 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; uiName = "MotorScooter "; rideable = true; lookUpLimit = 0.65; lookDownLimit = 0.45; 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; numDmgEmitterAreas = 1; initialExplosionProjectile = vehicleExplosionProjectile; initialExplosionOffset = 0; //offset only uses a z value for now burnTime = 4000; finalExplosionProjectile = vehicleFinalExplosionProjectile; 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 }; function MotorScooter::onAdd(%this,%obj) { //mount the nothing tire and ski spring %obj.setWheelTire(0, MotorScootertire); %obj.setWheelTire(1, MotorScootertire); %obj.setWheelSpring(0, MotorScooterSpring); %obj.setWheelSpring(1, MotorScooterSpring); %obj.setWheelSteering(0,1); %obj.setWheelPowered(0,true); %obj.setWheelPowered(1,true); %obj.setWheelPowered(0,true); } package HugPackage { function armor::onMount(%this,%obj,%col,%slot) { Parent::onMount(%this,%obj,%col,%slot); if(%col.dataBlock $= MotorScooterVehicle) { %obj.playThread(0, armreadyboth); } } }; activatepackage(HugPackage); --- End code --- No wheeled Preview so far A little help would be nice, thanks. To help you may respond to this topic, or simply email me via: BLShane@Live.com |
| Jellypuddle:
Wrong topic |
| heedicalking:
--- Code: ---shapeFile = "./MotorScootertire.dts"; --- End code --- Do you have a file named that? |
| Edmund:
Yes, would you like the dts components? |
| Wesley Williams:
This is in the wrong place. Sorry, but how do you even make a scooter? I've tried using Blender and its gay. Torque or Google SketchUp is way easier. :[ |
| Navigation |
| Message Index |