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

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.
Ah.


Yeps. Lol look at our back and forth replies.
Yes. I need help with collision meshing. Do I just make a box? And what do I name it?

Yes. I need help with collision meshing. Do I just make a box? And what do I name it?
Blender or milkshape?


Yes. I need help with collision meshing. Do I just make a box? And what do I name it?

A box seem to work best, of what I've tried so far. And name is Col.
For more info (if you're using Blender) see this page: http://forum.blockland.us/index.php?topic=66763.0

Edit: never mind about the Blender thing.. :P

OnTopic:  Nice model you got there!

May I ask what Modeling program you are using?

A box seem to work best, of what I've tried so far. And name is Col.
For more info (if you're using Blender) see this page: http://forum.blockland.us/index.php?topic=66763.0

Edit: never mind about the Blender thing.. :P

OnTopic:  Nice model you got there!

May I ask what Modeling program you are using?


I'm using blender. Thanks.

@Pi: well, for blender make a box around object make it wireframe name it Col then make an (forgot name... I think empty) and name that Col0. Then parent Col to Col0 and Col0 to Shape.

I'm using blender. Thanks.

@Pi: well, for blender make a box around object make it wireframe name it Col then make an (forgot name... I think empty) and name that Col0. Then parent Col to Col0 and Col0 to Shape.

I not sure that matters for how it looks/works ingame. I guess it just makes it easier to work with. :P

I not sure that matters for how it looks/works ingame. I guess it just makes it easier to work with. :P
yea, it makes no difference in-game if it's not wireframe but, you can't see crap if it isn't, you would have to randomly click around until you hit the right thing, but then again, how would you know if it was the right thing? :P

Ah omg. I don't know where to start.

First of all, I have no clue whether or not you have this as a physics vehicle or bot vehicle.
Either the collision box is off, which is causing it to sink into the floor.
(off as in, offsetting)
I don't know where to start.
I suggest making a simple box vehicle with wheels and getting the 'vehicle' right.

Ah omg. I don't know where to start.

First of all, I have no clue whether or not you have this as a physics vehicle or bot vehicle.
Either the collision box is off, which is causing it to sink into the floor.
(off as in, offsetting)
I don't know where to start.
I suggest making a simple box vehicle with wheels and getting the 'vehicle' right.
It spawns correctly (spawns on spawn brick facing the right way and not above ground. It drives fine in the water, how else could I check? Do you want me to upload here?

Heres the 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 = "";
};

And yes, i know i still did leave his explosions in there, ect.

P.S. Added script to OP

Didn't read thread but is there an actual mount joint? Probably spawning the player at 0 0 0 of the vehicle.

Didn't read thread but is there an actual mount joint? Probably spawning the player at 0 0 0 of the vehicle.
Yes lol, mount0 and it is patented to the right thing (forgot, on phone).