Game Development Community

Hover vehicle Help needed

by Michael Roberts 13 · in Torque 3D Beginner · 02/08/2015 (7:37 am) · 16 replies

HI guys i got a hover vehicle problem,The script was created and shows up in datablock editor but refuses to show up in library/scripted section.And im honestly not sure of what to do and i need some help.

About the author

13 year old teen,n00b scriptor but skillful in 3d artists.Gamer 4 life


#1
02/08/2015 (11:37 am)
That is odd. Unfortunately I'm not at my computer. When you created the new datablock, what datablock did you copy the values from?

Perhaps try to convert the flying vehicle to a hover vehicle directly in script?
#2
02/08/2015 (12:44 pm)
this is the script i got it from http://www.garagegames.com/community/resources/view/7079

datablock HoverVehicleData(CronoCycle)
{
spawnOffset = "0 0 1";

floatingGravMag = 50.5;

catagory = "Vehicles";
shapeFile = "art/shapes/buggy/buggy.dts";
computeCRC = true;


renderWhenDestroyed = false;

drag = 0.6;
density = 0.3;

mountPose[0] = sitting;
numMountPoints = 1;
cameraMaxDist = 15.0;
cameraOffset = 5.7;
cameraLag = 5.5;
isProtectedMountPoint[0] = false;
explosionDamage = 0.5;
explosionRadius = 5;

lightOnly = 1;

maxDamage = 120;
destroyedLevel = 120;

isShielded = 1;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 150;
minJetEnergy = 15;
jetEnergyDrain = 1.3;

// Rigid Body
mass = 5;
bodyFriction = 0;
bodyRestitution = 0.5;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound

// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 29;
speedDamageScale = 0.01;

// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23;
collDamageMultiplier = 0.030;

dragForce = 4; // 1.9
// dragForce = 25 / 45.0;
vertFactor = 0.5;
floatingThrustFactor = 0.35;

mainThrustForce = 100;
reverseThrustForce = 70;
strafeThrustForce = 70;
turboFactor = 1.5;

brakingForce = 30;
brakingActivationSpeed = 30;

stabLenMin = 6.50;
stabLenMax = 7.25;
stabSpringConstant = 20;
stabDampingConstant = 20;

gyroDrag = 16; // 16 // 36
gyroForce = 50; //50
normalForce = 10;
restorativeForce = 100;
steeringForce = 90;
rollForce = 7;
pitchForce = 10;


minMountDist = 4;



checkRadius = 1.7785;
observeParameters = "1 10 10";

shieldEffectScale = "0.9375 1.125 0.6";
isProtectedMountPoint0 = "0";
mountPose0 = "sitting";
};

#3
02/08/2015 (1:37 pm)
Hmm...I take it buggy.dts is in the correct place? You executed the script in datablockExec.cs?
#4
02/08/2015 (2:14 pm)
yes and yes any clue of what else i should do
#5
02/08/2015 (2:26 pm)
Any console errors?
#6
02/08/2015 (3:01 pm)
none
#7
02/09/2015 (5:35 am)
I admit, I can't find out what could possibly be wrong. I've got it alongside another hover vehicle I got working, ( well at least addable to the scene.) and I can't see anything thhat would stop it from showing up in scripted.

Here's where I got the other vehicle. I had to change a few things.

www.garagegames.com/community/resources/view/6562

Hopefully I can look into further tonight.
#8
02/09/2015 (6:13 am)
Perhaps use this and change variables to suit. I can drive it now.



datablock HoverVehicleData(Hover)
{
   spawnOffset = "0 0 1";

   floatingGravMag = 55.5;

   category = "Vehicles";
   shapeFile = "art/shapes/HoverCraft/hovertank.dts";
   emap = true;

   maxDamage = 1000.0;
   destroyedLevel = 900.0;
//debrisShapeName = "~/data/shapes/player/GRAVTANK.dts";
//debris = ShapeDebris;
//renderWhenDestroyed = false;

   drag = 0.2;
   density = 0.3;
   hoverHeight = 3;              // Height off the ground at rest     
   createHoverHeight = 3;
   integration = 4;           // Physics integration: TickSec/Rate
   collisionTol = 0.3;        // Collision distance tolerance
   contactTol = 0.2;          // Contact velocity tolerance

   cameraMaxDist = 10.0;
   cameraOffset = 5.7;
   cameraLag = 5.5;

   explosion = HoverExplosion;
   explosionDamage = 0.5;
   explosionRadius = 5.0;

   rechargeRate = 0.7;
   energyPerDamagePoint = 75;
   maxEnergy = 650;
   minJetEnergy = 165;
   jetEnergyDrain = 1.3;

// Rigid Body
   mass = 90;
   bodyFriction = 0.1;
   bodyRestitution = 0.3;
   softImpactSpeed = 20; // Play SoftImpact Sound
   hardImpactSpeed = 28; // Play HardImpact Sound

// Ground Impact Damage (uses DamageType::Ground)
   minImpactSpeed = 29;
   speedDamageScale = 0.10;

// Object Impact Damage (uses DamageType::Impact)
   collDamageThresholdVel = 23;
   collDamageMultiplier = 0.030;

   dragForce = 1.0;
// dragForce = 25 / 45.0;
   vertFactor = 0.8;
   floatingThrustFactor = 0.5;

   mainThrustForce = 600;
   reverseThrustForce = 600;
   strafeThrustForce = 670;
   turboFactor = 1.5;

   brakingForce = 900;
   brakingActivationSpeed = 30;

   stabLenMin = 28.50;
   stabLenMax = 32.50;
   stabSpringConstant = 38;
   stabDampingConstant = 28;

   gyroDrag = 18; // 16
   //gyroForce = 50;
   normalForce = 30;
   restorativeForce = 1600;
   steeringForce = 1000;
   rollForce = 30;
   pitchForce = 30;

   dustEmitter = HoverEmitter;
   triggerDustHeight = 0.5;
   dustHeight = 1.0;
   dustTrailEmitter = HoverEmitter;
   dustTrailOffset = "0.0 -1.0 0.5";
   triggerTrailHeight = 2.6;
   dustTrailFreqMod = 15.0;

   //jetSound = ScoutSqueelSound;
   //engineSound = ScoutEngineSound;
   //floatSound = ScoutThrustSound;
   //softImpactSound = GravSoftImpactSound;
   //hardImpactSound = HardImpactSound;
   //wheelImpactSound = WheelImpactSound;
   maxMountSpeed = 100;
   mountDelay = 100;
   dismountDelay = 1;

   stationaryThreshold = 0.5;
   maxDismountSpeed = 0.1;
   numMountPoints = 2;

   mountPose[0] = "sitting";
   mountPose[0] = sitting;
   mountPointTransform[0] = "0 0 0 0 0 1 0";
   isProtectedMountPoint[0] = false;
   
   //
   softSplashSoundVelocity = 10.0;
   mediumSplashSoundVelocity = 20.0;
   hardSplashSoundVelocity = 30.0;
   exitSplashSoundVelocity = 10.0;

   //exitingWater = VehicleExitWaterSoftSound;
   //impactWaterEasy = VehicleImpactWaterSoftSound;
   //impactWaterMedium = VehicleImpactWaterSoftSound;
   //impactWaterHard = VehicleImpactWaterMediumSound;
   //waterWakeSound = VehicleWakeSoftSplashSound;

   minMountDist = 4;

   damageEmitter[0] = HoverEmitter;
   damageEmitter[1] = HoverEmitter;
   damageEmitter[2] = HoverEmitter;
   damageEmitterOffset[0] = "0.0 -1.5 0.5 ";
   damageLevelTolerance[0] = 0.3;
   damageLevelTolerance[1] = 0.7;
   numDmgEmitterAreas = 2;

   splashEmitter[0] = HoverEmitter;
   splashEmitter[1] = HoverEmitter;

   checkRadius = 1.7785;
   observeParameters = "1 10 10";

    damageEmitter[0] = LightDamageEmitter;
    damageEmitter[1] = HeavyDamageEmitter;
    damageEmitter[2] = DestroyedEmitter;
    damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
    damageLevelTolerance[0] = 0.3;
    damageLevelTolerance[1] = 0.7;
    numDmgEmitterAreas = 1;

    explosion = hoverExplosion;
    //debrisShapeName = "~/data/shapes/explosions/debris.dts";
    //debris = hoverDebris;


   splash = hoverSplash;
   splashVelocity = 4.0;
   splashAngle = 67.0;
   splashFreqMod = 300.0;
   splashVelEpsilon = 0.60;
   bubbleEmitTime = 0.4;
   splashEmitter[0] = hoverFoamDropletsEmitter;
   splashEmitter[1] = hoverFoamEmitter;
   splashEmitter[2] = hoverBubbleEmitter;
   mediumSplashSoundVelocity = 10.0;
   hardSplashSoundVelocity = 20.0;
   exitSplashSoundVelocity = 5.0;

//runningLight[0] = WildcatLight1;
//runningLight[1] = WildcatLight2;
//runningLight[2] = WildcatLight3;

  // shieldEffectScale = "0.9375 1.125 0.6";
};



#9
02/09/2015 (2:38 pm)
dosent work this is freaking annoying ive spent hours upon hours trying to find a solution but STILL NOTHING
#10
02/09/2015 (4:21 pm)
Hey Michael,

That's part of the hidden fun of T3D and game development in general. :)

Okay, here is the working HoverCar. Drop this in your project folder and make the changes included in the install.txt and HoverCar will be added to your scripted vehicles. Make changes as needed to the vehicles characteristics. hoverVehicle.cs.

www.mediafire.com/?paehuce9926sx1e
#11
02/09/2015 (9:31 pm)
Michael's Thread Must Helpful For Me.
and Thank you mr.Campbell For Replying my All 2 Threads
Hover Vehicle Is Important When Making a Space Travelling Game
#12
02/09/2015 (9:39 pm)
Old resource

This Is A 2004 Post, When I 3 Years Old
http://www.garagegames.com/community/resources/view/6562

is It Works With Torque 3D 3.6.2
#13
02/09/2015 (10:53 pm)
Yes but you need to change a few things.Mostly just file placement. Try it out I got it working, there are instructions in that mediafire link. If you like it tweak it then try to get the others working from the vehicles galore link.

Here is also a flying car if you want to look at it.
www.mediafire.com/download/uhboziwwpwtd4hc/FlyingCar.zip

I would like to note, I didn't write any of this code just got older stuff to work then packaged it up to try to help those new to T3D.
#14
02/10/2015 (11:33 am)
Thanks Jason it Works Great and is really helpful.
#15
02/15/2015 (8:35 pm)
Hover Vehicle Didn't Worked With PhysX Build. But It is Working With Default Torque Physics.

Flying Vehicle Is Working.
but It's Camera is Very Close To It. is it Fixes When I Change Cheetah Body.dae's
Camera Position With Blender ?
#16
02/15/2015 (8:35 pm)
./
#17
02/16/2015 (7:24 am)
i think you can even change camera position in the shape editor.