Author Topic: image not working properly.  (Read 1671 times)

ok this is pretty annoying

I PRESENT TO YOU
TWO BASICALLY IDENTICAL IMAGES

THE WORKING ONE:
Code: [Select]
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);
}


THE BROKEN ONE:
Code: [Select]
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);
}

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.
« Last Edit: June 10, 2012, 10:26:54 PM by otto-san »

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.

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.
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: [Select]
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";
 };

The methods I've tried for mounting the image are using the emote method and mountImage.

And is the image successfully mounted?

And is the image successfully mounted?
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.
« Last Edit: June 10, 2012, 11:12:26 PM by otto-san »

Looks like the colors all have 1 alpha, idk if that has anything to do with it.

Looks like the colors all have 1 alpha, idk if that has anything to do with it.
as i said

the emitter works fine when i use it other ways (ie setting a brick's emitter to it)

Have you tried copy-pasting the other emitter data and then just renaming it and see if that works?

Have you tried copy-pasting the other emitter data and then just renaming it and see if that works?
if you couldn't tell, yes.

Have you tried copy-pasting the other emitter data and then just renaming it and see if that works?
Lol

Well I can't see the other emitter code, I saw you did that for the datablock obviously.
:/

I was able to fix it by making the state emitter and timeout times longer.

I tried this before, but I forgot you have to re-start the server to update state variables, haha.