Author Topic: Spawn inside of vehicle?  (Read 2101 times)

In my vehicle, i when i jump in, I'm inside of it, in the box (base). It works the same and everything but, I'm inside. Here are some pictures.






First person view:


3rd person view:


Different 3rd person view:




Script:
Code: [Select]
datablock WheeledVehicleData(Boat424Vehicle)
{
category = "Vehicles";
displayName = " ";
shapeFile = "./Boat424.dts";
emap = true;
minMountDist = 3;
   
   numMountPoints = 1;
   mountThread[0] = "armReadyBoth";


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

massCenter = "1 1 1";
   //massBox = "1 1 -10";

maxSteeringAngle = 0.9785;  // 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 = 20;         // Far distance from vehicle
cameraOffset = 16.5;        // Vertical offset from camera mount point
cameraLag = 0.5;           // Velocity lag of camera
cameraDecay = 0.75;        // Decay per sec. rate of velocity lag
cameraTilt = 0.5;
   collisionTol = 0.1;        // Collision distance tolerance
   contactTol = 0.1;

useEyePoint = false;

   //numWheels = 0;

// Rigid Body
mass = 100;
density = 0.2;
drag = 3;
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 = 0; //4000;       // Engine power
engineBrake = 2000;         // Braking when throttle is 0
brakeTorque = 4000;        // When brakes are applied
maxWheelSpeed = 0;        // Engine scale by current speed / max speed



// Energy
maxEnergy = 0;
jetForce = 0;
minJetEnergy = 0;
jetEnergyDrain = 2;

   isSled = false;

   forwardThrust = 1000;
reverseThrust = 700;
lift = 0;
maxForwardVel = 1000;
maxReverseVel = 700;
horizontalSurfaceForce = 0;   // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 0;
rollForce = 0;
yawForce = 3200000;
pitchForce = 0;
rotationalDrag = 0.2;
stallSpeed = 0;

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 = "Boat424 ";
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;

   numDmgEmitterAreas = 1;

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

   burnTime = 4000;

   finalExplosionProjectile = FishBoatFinalExplosionProjectile;
   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
   
      // Advanced Steering
   steeringAutoReturn = false;
   // steeringAutoReturnRate = 0.9;
   // steeringAutoReturnMaxSpeed = 10;
   steeringUseStrafeSteering = false;
   // steeringStrafeSteeringRate = 0.1;
   
   // minContrailSpeed = 0;
};

function FishBoatcontrailCheck(%obj)
{
//return;
if(!isObject(%obj))
return;

%speed = vectorLen(%obj.getVelocity());
// if(%speed < %obj.dataBlock.minContrailSpeed)
// {
// if(%obj.getMountedImage(3) !$= "")
// {
// %obj.unMountImage(2);
// %obj.unMountImage(3);
// }
// }
// else
// {
// if(%obj.getMountedImage(3) $= 0)
// {
// %obj.mountImage(contrailImage1,2);
// %obj.mountImage(contrailImage2,3);
// }
// }

if(%speed < 5)
{
if(%obj.prop !$= "slow")
{
%obj.playThread(0,radar);
%obj.prop = "slow";
}
}
else
{
if(%obj.prop !$= "fast")
{
%obj.playThread(0,radar);
%obj.prop = "fast";
}
}

schedule(2000,0,"FishBoatcontrailCheck",%obj);
   
}

function FishBoatvehicle::onadd(%this,%obj)
{
parent::onadd(%this,%obj);

%obj.playthread(0,radar);

FishBoatcontrailCheck(%obj);
   
}

// Projectile - you can't spawn explosions on the server, so we use a short-lived projectile
/////////////////////////////////
datablock ProjectileData(FishBoatExplosionProjectile : vehicleExplosionProjectile)
{
   directDamage        = 0;
   radiusDamage        = 0;
   damageRadius        = 0;
   explosion           = FishBoatExplosion;

   directDamageType  = $DamageType::VehicleExplosion;
   radiusDamageType  = $DamageType::VehicleExplosion;

   explodeOnDeath = 1;

   armingDelay         = 0;
   lifetime            = 0;

   uiName = "";
};
datablock DebrisData(FishBoatDebris)
{
   emitters = "JeepDebrisTrailEmitter";

shapeFile = "./fishboatwreck.dts";
lifetime = 3.0;
minSpinSpeed = -500.0;
maxSpinSpeed = 500.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 1;
staticOnMaxBounce = true;
snapOnMaxBounce = false;
fade = true;

gravModifier = 2;
};

datablock ExplosionData(FishBoatFinalExplosion : vehicleFinalExplosion)
{
   debris = FishBoatDebris;
   debrisNum = 1;
   debrisNumVariance = 0;
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisThetaMin = 0;
   debrisThetaMax = 20;
   debrisVelocity = 18;
   debrisVelocityVariance = 3;
};

datablock ProjectileData(FishBoatFinalExplosionProjectile : vehicleFinalExplosionProjectile)
{
   directDamage        = 0;
   radiusDamage        = 0;
   damageRadius        = 0;
   explosion           = FishBoatFinalExplosion;

   directDamageType  = $DamageType::VehicleExplosion;
   radiusDamageType  = $DamageType::VehicleExplosion;

   explodeOnDeath = 1;

   armingDelay         = 0;
   lifetime            = 0;
   
   uiName = "";
};

Yes i did use GSF Fishboat's script and changed it up, thats just temporary. The boat is called Boat424 for now so i can get to it quicker...



Another question, how do i put color onto my vehicle that shows up in-game? I know it has to do with textures or something but, how? Thank you
« Last Edit: December 16, 2009, 07:09:31 AM by iownu424 »

You probobly set the mount as #5 (or whatever head is).

You probobly set the mount as #5 (or whatever head is).
it is mount0 if that is what your asking.

Change were the mount point is.

Change were the mount point is.
I did. I made it higher up and then lower. It's not working still. Suggestions anyone?

it is mount0 if that is what your asking.
No, in the script.


so what do I do in the script?
Look in the script. If there is something that says like (SetmountPount) = 5
then that is the problem.

Look in the script. If there is something that says like (SetmountPount) = 5
then that is the problem.
Ok and when I find it what should I change it too?

Ok and when I find it what should I change it too?
Not sure. :/

I think it is possibly: 2 or 3.

Not sure. :/

I think it is possibly: 2 or 3.
ok thanks, can't look until tomorrow though.

On another note: Whatcha think about my model?

On another note: Whatcha think about my model?
It's nice.

It's nice.
thanks. My first vehicle model ever. Lighting is bad on front deck though, don't know how to fix that though :/

thanks. My first vehicle model ever. Lighting is bad on front deck though, don't know how to fix that though :/
Who scripted this?

Who scripted this?

Well I have NO idea how to scoot so I took GSF fishboat ls script and changed a couple things with the dts file and ui name and stuff. But I won't release with that, I'm still trying to get scripter.