Author Topic: Game Crashes when I spawn an add-on.  (Read 952 times)

I have been tring to make an add-on, a simble edit of the ball, and when I try to spawn it in Blockland, the game crashes.
I looked and looked, but I don't see anything in the script that's wrong, or still named "Ball", for that matter. What's the problem?


Ok.
Code: [Select]
datablock WheeledVehicleData(CrateVehicle)
{
category = "Vehicles";
displayName = " ";
shapeFile = "./Crate.dts";
emap = true;
minMountDist = 3;
   
   numMountPoints = 0;
   mountThread[0] = "sit";
   mountThread[1] = "sit";
   mountThread[2] = "sit";
   mountThread[3] = "sit";
   mountThread[4] = "sit";
   mountThread[5] = "sit";
   mountThread[6] = "sit";
   mountThread[7] = "sit";

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

massCenter = "0 0 0";
   massBox = "3 3 3";

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 = jeepTire;
//defaultSpring = jeepSpring;
//flatTire     = jeepFlatTire;
//flatSpring = jeepFlatSpring;

   numWheels = 0;

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

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

   isSled = false;

   forwardThrust = 3000;
reverseThrust = 2000;
lift = 100;
maxForwardVel = 40;
maxReverseVel = 40;
horizontalSurfaceForce = 0;   // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 0;
rollForce = 4000;
yawForce = 6000;
pitchForce = 6000;
rotationalDrag = 0.15;
stallSpeed = 10;

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





displayName should be uiName? 

Should it be:
Code: [Select]
uiName = " ";or:
Code: [Select]
displayName = "uiName";

I'm not 100% sure, but I've never heard of display name.
And the first one you posted, but if you leave the uiName blank, it won't show in the vehicle list.  The uiName is the name it has in the list, basically.

Code: [Select]
uiName = "Crate";

I got it to not crash the game, but now it falls through everything. It has no collision.

I got it to not crash the game, but now it falls through everything. It has no collision.
What was it that you fixed?

And you probably need a collision mesh or something, but I don't really know about them.  Just wait for someone else to come along to answer.

UiName didn't help, so i set it back to displayname, and set it to "crate";
But I do not know how to make a collision mesh.

I believe a collision is needed. I do not know about wheels, they may hold it up but it may turn out to be VERY buggy when you run into walls and such.

I believe a collision is needed. I do not know about wheels, they may hold it up but it may turn out to be VERY buggy when you run into walls and such.
Not having wheels is fine, it just can't roll like a vehicle.

Well, it IS a crate, it's not meant to be a car.

How do you get a collision mesh in Blender?

Well, it IS a crate, it's not meant to be a car.

How do you get a collision mesh in Blender?
Add a cube and scale it to fit. Name the cube Col

Parent Col to a new empty named Col0 then parent that col0 empty to Shape.

Well, now it has a collision mesh, but when it's spawned in-game, it has a number of problems.
For one thing, the crate hovers. Another thing is that when it's spawned, I freeze(My avatar) for a little bit, and there are invisible barriers on 3 sides.
The fourth thing is... well... look!

You're an idiot that doesn't listen.