Blockland Forums > Modification Help

Emitter Help

Pages: (1/2) > >>

jes00:

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: ---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);
}
}

--- End code ---


CityRPG:

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


--- Code: ---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;
};
--- End code ---


jes00:


--- Quote from: CityRPG on January 11, 2012, 03:34:12 PM ---There might be a better way, but this should work.


--- Code: ---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;
};
--- End code ---

--- End quote ---
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?

CityRPG:

Play with these for offset on the image:


--- Code: ---offset = "0 0 0";
eyeoffset= "0 0 0";

--- End code ---

The property for shrinking this:


--- Code: ---sizes[0]      = 1.7;
sizes[1]      = 1.7;
sizes[2]      = 0.4;
--- End code ---

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

jes00:


--- Quote from: CityRPG on January 11, 2012, 03:47:31 PM ---Play with these for offset on the image:


--- Code: ---offset = "0 0 0";
eyeoffset= "0 0 0";

--- End code ---

The property for shrinking this:


--- Code: ---sizes[0]      = 1.7;
sizes[1]      = 1.7;
sizes[2]      = 0.4;
--- End code ---

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

--- End quote ---
It's not shrinking anymore, but it's still moving and not above the head.

Pages: (1/2) > >>

Go to full version