Author Topic: Emitter Help  (Read 536 times)

I need help creating an emitter above the player's head that stays there until told to leave.

This is what I have so far:
Code: [Select]
datablock ParticleData(AFKEmoteParticle)
{
dragCoefficient      = 0.0; //6.0
gravityCoefficient   = 0.0;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.0;
lifetimeMS           = 5000;
lifetimeVarianceMS   = 0;
useInvAlpha          = true;
textureName          = "./AFK_Image";
colors[0]     = "1.0 1.0 1.0 1.0";
colors[1]     = "1.0 1.0 1.0 1.0";
colors[2]     = "1.0 1.0 1.0 0.0";
sizes[0]      = 1.7;
sizes[1]      = 1.7;
sizes[2]      = 0.4;
times[0]      = 0.0;
times[1]      = 0.2;
times[2]      = 1.0;
};

datablock ParticleEmitterData(AFKEmoteEmitter)
{
ejectionPeriodMS = 60;
periodVarianceMS = 0;
ejectionVelocity = 0.5;
ejectionOffset   = 0.9;
velocityVariance = 0.0; //0.49
thetaMin         = 0;
thetaMax         = 120;
phiReferenceVel  = 0;
phiVariance      = 0; //360
overrideAdvance = false;
particles = "AFKEmoteParticle";

uiName = "Emote - AFK";
};

datablock ShapeBaseImageData(AFKEmoteImage)
{
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]                                        = AFKEmoteEmitter;
stateEmitterTime[1]                                = 0.350;

stateName[2]                                        = "Done";
stateScript[2]                                        = "onDone";
};

function AFKEmoteImage::onDone(%client, %obj, %slot)
{
if(%client.isAFK != 1)
{
%obj.unMountImage(%slot);
}

else if(%client.isAFK != 0)
{
%client.player.emote(AFKEmoteImage);
}
}
« Last Edit: January 11, 2012, 03:25:02 PM by jes00 »

There might be a better way, but this should work.

Code: [Select]
datablock ShapeBaseImageData(AFKEmoteImage)
{
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]                = "Loop";
stateWaitForTimeout[1]                        = True;
stateTimeoutValue[1]                        = 0.350;
stateEmitter[1]                                        = AFKEmoteEmitter;
stateEmitterTime[1]                                = 0.350;

stateName[2]                                        = "Loop";
stateTransitionOnTimeout[2]                = "FireA";
stateEmitterTime[2]                                = 0;
};

There might be a better way, but this should work.

Code: [Select]
datablock ShapeBaseImageData(AFKEmoteImage)
{
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]                = "Loop";
stateWaitForTimeout[1]                        = True;
stateTimeoutValue[1]                        = 0.350;
stateEmitter[1]                                        = AFKEmoteEmitter;
stateEmitterTime[1]                                = 0.350;

stateName[2]                                        = "Loop";
stateTransitionOnTimeout[2]                = "FireA";
stateEmitterTime[2]                                = 0;
};
The emote is now sustained but it is sustained in the body/neck, not head. How would I sustain it above the head, not shrinking, and staying in the same place?

Play with these for offset on the image:

Code: [Select]
offset = "0 0 0";
eyeoffset= "0 0 0";

The property for shrinking this:

Code: [Select]
sizes[0]      = 1.7;
sizes[1]      = 1.7;
sizes[2]      = 0.4;

Changing [2] from 0.4 to 1.7 will sustain size.

Play with these for offset on the image:

Code: [Select]
offset = "0 0 0";
eyeoffset= "0 0 0";

The property for shrinking this:

Code: [Select]
sizes[0]      = 1.7;
sizes[1]      = 1.7;
sizes[2]      = 0.4;

Changing [2] from 0.4 to 1.7 will sustain size.
It's not shrinking anymore, but it's still moving and not above the head.

Did you even try modifying the offset variable? The invisible image is going to mount exactly on the node and the emitter, too. Increase the offset on the Z axis. Restart server. Rinse, repeat until you're happy.

Code: [Select]
thetaMax         = 120;
Set to 0 to disable movement, I think. It's going to be an emitter property.

for image
Code: [Select]
offset = "0 0 1";