Author Topic: Mounted on vehicle in crouch position  (Read 1311 times)

Would this be posible?

Yes. Just change the player's animation for that mountpoint in the vehicle. I haven't tested it, but in theory it should work. If that doesn't work, you could just use playThread.

Yes. Just change the player's animation for that mountpoint in the vehicle. I haven't tested it, but in theory it should work. If that doesn't work, you could just use playThread.

/facepalm

Your "Theory" fails...

Its just:

"crouch"

So somewere in the code, wouldn't it tell to sit would I replace that with crouch. Just woundering, cause it would be a nice feature for my crouch rocket.

Code: [Select]
mountThread[0] = "crouch";
like that?

Hmm might be when im done ill tell ya


k thanks trying it out with scooter code to see if it works

Lol my model is like 4000 times to small time to size it up :D

Ok yes the crouch works :D now i need to make custom wheels

sorry for quadriple post but from this script is there a reason why i get a c++ visual error when its activated.
Code: [Select]
if(!isObject(scooterExplosionSound))
{
   exec("./Support_Scooter.cs");
}
//----------------------------------------------------------------------------

datablock WheeledVehicleTire(fishtailTire)
{
   // 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 = "./shapes/crouch wheel.dts";

mass = 20;
    radius = 1;
    staticFriction = 7.8;
   kineticFriction = 3.8;
   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 WheeledVehicleData(scooterVehicle)

{
category = "Vehicles";
displayName = "Crouch Rocket ";
shapeFile = "./shapes/Crouch Rocket.dts"; //"~/data/shapes/skivehicle.dts"; //
emap = true;
minMountDist = 3;
   
   numMountPoints = 2;
   mountThread[0] = "crouch";


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

massCenter = "0 0 -1";
    massBox = "10 5 1";

maxSteeringAngle = 0.9785;  // Maximum steering angle, should match animation
integration = 4;           // Force integration time: TickSec/Rate
tireEmitter = TireEmitter; // 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 = crouchwheele;
// defaultSpring = scooterSpring;
// flatTire = scooterFlatTire;
// flatSpring = scooterFlatSpring;

   //numWheels = 4;

// Rigid Body
mass = 150;
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 = 6000; //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 = 100; //900;
yawForce = 100; //600;
pitchForce = 100; //1000;
rotationalDrag = 0.1;

// Energy
maxEnergy = 100;
jetForce = 3000;
minJetEnergy = 30;
jetEnergyDrain = 2;

splash = scooterSplash;
splashVelocity = 4.0;
splashAngle = 67.0;
splashFreqMod = 300.0;
splashVelEpsilon = 0.60;
bubbleEmitTime = 1.4;
splashEmitter[0] = scooterFoamDropletsEmitter;
splashEmitter[1] = scooterFoamEmitter;
splashEmitter[2] = scooterBubbleEmitter;
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 = "Crouch rocket";
rideable = true;
lookUpLimit = 0.65;
lookDownLimit = 0.45;

paintable = true;
   
   damageEmitter[0] = scooterBurnEmitter;
damageEmitterOffset[0] = "0.0 0.0 0.0 ";
damageLevelTolerance[0] = 0.99;

   damageEmitter[1] = scooterBurnEmitter;
damageEmitterOffset[1] = "0.0 0.0 0.0 ";
damageLevelTolerance[1] = 1.0;

   numDmgEmitterAreas = 1;

   initialExplosionProjectile = scooterExplosionProjectile;
   initialExplosionOffset = 0;         //offset only uses a z value for now

   burnTime = 4000;

   finalExplosionProjectile = scooterFinalExplosionProjectile;
   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 scooterVehicle::onAdd(%this,%obj)
{
//mount the nothing tire and ski spring
%obj.setWheelTire(0, crouch wheel);
%obj.setWheelTire(1, crouch wheel);

%obj.setWheelSpring(0, scooterSpring);
%obj.setWheelSpring(1, scooterSpring);

%obj.setWheelSteering(0,1);

%obj.setWheelPowered(0,true);
    %obj.setWheelPowered(1,true);
}


I know im using the fishT and scooter script but thats temperary for im just testing it now

Code: [Select]
datablock WheeledVehicleData(scooterVehicle)

{
category = "Vehicles";
displayName = "Crouch Rocket ";

Remove the new line.

accualy i found the proble i cant change the wheel would you happen to know how i could change it from the scooter script

Code: [Select]
function scooterVehicle::onAdd(%this,%obj)
{
//mount the nothing tire and ski spring
%obj.setWheelTire(0, crouch wheel);
%obj.setWheelTire(1, crouch wheel);
Change "crouch wheel" here to "fishtailTire".

And change the names of the datablocks so it doesn't overwrite Kaje's scooter and the Fishtail...

Also, strings with spaces NEED double quotes around them. " is a double quote, '' is two single quotes. Just letting you know.
Example would be "crouch wheel" instead of crouch wheel.