Anyways, I honestly don't think it's animation order anymore. I can really use some help here with my code guys. Remember, I want to make it so that when it reaches X BLMPH, the spoiler goes up, and then while the spoiler is up, and our speed is 0, the spoiler goes down.
Here's the code, I'll update the coding in the OP as well.
datablock TSShapeConstructor(Bolt_164_DTS)
{
baseShape = "./Bolt 16-4.dts";
sequence0 = "./root.dsq root";
sequence1 = "./16.4S-DOWN.dsq DOWN";
sequence2 = "./16.4S-UP.dsq UP";
sequence3 = "./headlightON.dsq ON";
sequence4 = "./headlightOFF.dsq OFF";
};
Code for importing animations
package BoltFunctions
{
function BoltVehicle::onAdd(%this,%obj)
{
Parent::onAdd(%this,%obj);
%obj.hideNode(lhand);
%obj.hideNode(rhand);
%obj.hideNode(lhook);
%obj.hideNode(rhook);
%obj.hideNode(lightsON);
%obj.hideNode(brakeOFFLIGHT);
%obj.playThread(0,OFF);
%obj.playThread(0,DOWN);
%obj.schedule(0,garageDefault);
}
function serverCmdLight(%client)
{
if(isObject(%client.player) && !isObject(%client.player.light))
{
%player = %client.Player;
%carlight = %player.getControlObject();
if(isObject(%carlight))
if(%carlight.getDatablock() == BoltVehicle.getID())
{
if(%carlight.door == 1)
{
%carlight.door = 0;
%carlight.unhidenode(lightsOFF);
%carlight.unhidenode(brakeOFF);
%carlight.hidenode(lightsON);
%carlight.hidenode(brakeOFFLIGHT);
%carlight.playThread(0,OFF);
}
else
{
%carlight.door = 1;
%carlight.unhidenode(lightsON);
%carlight.unhidenode(brakeOFFLIGHT);
%carlight.hidenode(lightsOFF);
%carlight.hidenode(brakeOFF);
%carlight.playThread(0,ON);
}
return;
}
}
parent::serverCmdLight(%client);
}
function BoltSpeedCheck(%this, %obj)
{
if(!isObject(%obj))
return;
%vehicle = %obj;
%speed = vectorLen(%obj.getVelocity());
if(!%vehicle.oldSpeed)
%vehicle.oldSpeed = %speed;
//Braking is not working currently
//if(%vehicle.oldSpeed)
//{
//if((%vehicle.oldSpeed - %speed) > 2) //Braking rate of speed in 500MS
//%applyBrakes = true;
//if(%speed < 1)
//%applyBrakes = false;
//}
if(%speed < 0) //Keeps throwing random negative numbers when Aero is at dead stop
%speed = 0;
%vehicle.oldSpeed = %speed;
//commandtoclient(%vehicle.getControllingClient(),'bottomprint', mFloor(%speed * 2) @"<color:FFFF00>BPS", 1);
//We use else if's so that it will find a true statement then skip the rest
if(%speed < 2) {
%vehicle.playThread(0,DOWN);
}
else if(%speed > 65) {
%vehicle.playThread(1,UP);
}
//if(%applyBrakes)
//%vehicle.playAudio(1, AeroDrift);
//if(!%applyBrakes)
//%vehicle.stopAudio(1);
schedule(500,0,"BoltSpeedCheck",%this,%obj);
}
};
activatePackage(BoltFunctions);
Package for Vehicle's Functions
If I can't get this fixed I'm going to have to go to my alternative plan and use a custom key bind to activate this spoiler.