datablock ShapeBaseImageData(ArbitratorEngineImage1)
{
shapeFile = "./empty.dts";
emap = false;
mountPoint = "engine";
rotation = "1 0 0 180";
stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;
stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 10000;
stateEmitter[1] = ArbitratorEngineEmitter;
stateEmitterTime[1] = 10000;
stateName[2] = "Done";
stateScript[2] = "onDone";
};
function ArbitratorEngineImage1::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
datablock ShapeBaseImageData(ArbitratorEngineImage2)
{
shapeFile = "./empty.dts";
emap = false;
mountPoint = "engine";
rotation = "1 0 0 180";
stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;
stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 10000;
stateEmitter[1] = ArbitratorEngineSmokeEmitter;
stateEmitterTime[1] = 10000;
stateName[2] = "Done";
stateScript[2] = "onDone";
};
function ArbitratorEngineImage2::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
function ArbitratorEngineCheck(%obj)
{
// return;
if(!isObject(%obj))
return;
%speed = vectorLen(%obj.getVelocity());
if(%speed < %obj.dataBlock.ArbitratorEngineSpeed)
{
if(%obj.getMountedImage(0) !$= "")
{
%obj.unMountImage(0);
// %obj.unMountImage(3);
}
}
else
{
if(%obj.getMountedImage(0) $= 0)
{
%obj.mountImage(ArbitratorEngineImage2,0);
// %obj.mountImage(contrailImage2,3);
}
}
if(%obj.getMountedObject(0))
{
if(%obj.getMountedImage(1) $= 0)
{
%obj.mountImage(ArbitratorEngineImage1,1);
}
}
else
{
if(%obj.getMountedImage(1) !$= "")
{
%obj.unMountImage(1);
}
}
schedule(2000,0,"ArbitratorEngineCheck",%obj);
}
This is the mount point. The joint name for the location for the emitter is named "engine", but It seems to want to mount to the player seat instead.
mountpoint = engine;