Blockland Forums > Modification Help
image not working properly.
otto-san:
ok this is pretty annoying
I PRESENT TO YOU
TWO BASICALLY IDENTICAL IMAGES
THE WORKING ONE:
--- Code: ---datablock ShapeBaseImageData(TremorDirtImage)
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;
mountPoint = $HeadSlot;
stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;
stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.350;
stateEmitter[1] = TremorDirtEmitter;
stateEmitterTime[1] = 0.350;
stateName[2] = "Done";
stateScript[2] = "onDone";
};
function TremorDirtImage::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
--- End code ---
THE BROKEN ONE:
--- Code: --- datablock ShapeBaseImageData(DagonInkImage)
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;
mountPoint = $HeadSlot;
stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;
stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.350;
stateEmitter[1] = DagonInkEmitter;
stateEmitterTime[1] = 0.350;
stateName[2] = "Done";
stateScript[2] = "onDone";
};
function DagonInkImage::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
--- End code ---
now
why is the latter code not working properly
Even when I call to use both of those the SAME WAY, the latter does not work (the former does).
Also, both emitters work fine when spawned on bricks.
Mr. Wallet:
You have misdiagnosed the problem. The error is not related to the code snippet you have given.
Since you ruled out the emitter which is the only notable difference, I have no hypotheses because "doesn't work" is as vague as you can possibly get within the realm of human language.
otto-san:
--- Quote from: Mr. Wallet on June 10, 2012, 10:34:36 PM ---You have misdiagnosed the problem. The error is not related to the code snippet you have given.
Other than the emitter I have no hypotheses because "doesn't work" is as vague as you can possibly get within the realm of human language.
--- End quote ---
I'm not quite sure how well I can describe how it isn't working, the emitter doesn't show when the image is mounted.
Here's the emitter and particle code.
--- Code: --- datablock ParticleData(DagonInkParticle)
{
dragCoefficient = 5;
gravityCoefficient = 0.25;
inheritedVelFactor = 0.1;
constantAcceleration = 0.0;
lifetimeMS = 3000;
lifetimeVarianceMS = 300;
spinSpeed = -10.0;
spinRandomMax = 100.0;
spinRandomMin = -100.0;
useInvAlpha = true;
textureName = "base/data/particles/cloud";
colors[0] = "0.1 0.1 0.1 1";
colors[1] = "0.1 0.1 0.1 1";
colors[2] = "0.1 0.1 0.1 1";
sizes[0] = 15;
sizes[1] = 12.5;
sizes[2] = 10;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(DagonInkEmitter)
{
ejectionPeriodMS = 500;
periodVarianceMS = 5;
ejectionVelocity = 2.5;
ejectionOffset = 0.5;
velocityVariance = 0.2;
thetaMin = 80;
thetaMax = 80;
phiReferenceVel = 45;
phiVariance = 360;
overrideAdvance = false;
particles = "DagonInkParticle";
uiName = "Dagon Ink - Underwater";
};
--- End code ---
The methods I've tried for mounting the image are using the emote method and mountImage.
Mr. Wallet:
And is the image successfully mounted?
otto-san:
--- Quote from: Mr. Wallet on June 10, 2012, 10:42:05 PM ---And is the image successfully mounted?
--- End quote ---
Yes.
edit:
I added in some echos and it's even getting through all the states.
edit again:
It also doesn't work when I use Tremor's dirt emitter.