hmm
yeah this seems easy enough, package the onTrigger function to catch spacebar triggers and then change the datablock to a drifting one
EDIT:
I haven't tested this but this is pretty much it:
package drift
{
function Armor::onTrigger(%datablock,%player,%slot,%val)
{
if(!%slot == 2 && !%player.getMountedObject().getDatablock() == VehicleDatablock.getid()) //Not sure about the getMountedObject and I'm too lazy to search for the function which gets the players vehicle datablock
Parent::onTrigger(%datablock,%player,%slot,%val)
%vehicle = %player.getMountedObject(); //same thing here, I have no idea if this is the right function
if(%val)
%vehicle.changeDatablock(VehicleThatDriftsDatablock); //I keep forgetting function names agh (idk if it's setdatablock or changedatablock)
else
%vehicle.changeDatablock(VehicleDatablock); //sets it back to the original car if the spacebar is up
}
}
activatepackage(drift);
I'm wayy too busy at the moment but if someone else can debug/package this that would be nice