Game Development Community

another vehicle thread

by Anthony Rosenbaum · in General Discussion · 01/11/2002 (9:13 am) · 7 replies

I think I found something
// Jetting
   if (move->trigger[3])
   {
      if (!mJetting && getEnergyLevel() >= mDataBlock->minJetEnergy)
         mJetting = true;
      if (mJetting) {
         F32 newEnergy = getEnergyLevel() - mDataBlock->jetEnergyDrain;
         if (newEnergy < 0) {
            newEnergy = 0;
            mJetting = false;
         }
         setEnergyLevel(newEnergy);
      }
   }
PLEASE someone tell me if my next statement is right.
By defaut the mvTrigger3 (move trigger) IF a player in in a vehicle trigger 3 will be used for thrust. So all we would have to do is bind a thrust key in scripts like is
function mouseJet(%val)
{
   $mvTriggerCount3 += $mvTriggerCount3 & 1 == %val ? 2 : 1;
}
and
moveMap.bind( mouse, button1, mouseJet );

So lets say I wanted a vehicle whos thrust would depend on the rotation of the thruster (pointing downward or toward the back, like t1 transport ships) Does that require additonal coding or would it depend on a dummy object in the .dts file?
If so what is the name of the thruster node?
I thought the animations could dictate where the thruster was.
Sorry this is a long winded post I hope to clear up some of the vehicle mysteries for everyone.
Anthony

#1
01/11/2002 (12:17 pm)
bump
#2
04/09/2002 (2:19 pm)
bump

I'm assuming your still trying to find an aswer and so am I.
#3
04/09/2002 (2:24 pm)
From flyingvehicle.cc

"JetNozzle0", // Thrust Forward
"JetNozzle1",
"JetNozzleX", // Thrust Backward
"JetNozzleX",
"JetNozzle2", // Thrust Downward
"JetNozzle3",
"contrail0", // Trail
"contrail1",
"contrail2",
"contrail3",
#4
04/10/2002 (9:33 am)
So those would be dummy nodes on the model?
#5
04/10/2002 (10:43 am)
Yep










(don't you hate one word posts)
#6
04/10/2002 (10:49 am)
Sometimes
#7
04/10/2002 (10:52 am)
Nice :)