Blockland Forums > Modification Help
Emitter problems?
Treynolds416:
After doing some tests, I believe I have found a solution and an explanation.
You see, there is really no way to make the emitter make a sideways circle with the emitter brick facing up. This may be a bit confusing, but Theta degrees do not run all the way to 360.
Let me explain: Phi units go up from 0 to 360. In a three dimensional space where you are looking along the X-Axis, phi units control and rotate around the Y-Axis. Theoretically, you should not be able to see the phi units from the X-Axis, but it might be easier to think of it ass you just seeing a line. Theta degrees control part rotation around the X-Axis. What I mean by part rotation is this: Theta degrees only go up to 180 degrees. Any value above 180 will return a single line in the console and work as 180 anyway. Think of phi and theta like how the Blockhead moves. He can turn one direction and eventually end up where he started, while he cannot look down and eventually come back to where he started without changing direction.
Now to the actual fix. There is really no great way to spawn an emitter so that you can see it all from your position on the X-Axis, when the emitter direction is 'up'. Instead, a ring should be made with phi units and then rotated whatever direction using Blockland's built-in method. In fact, the way you were doing it would have eventually failed, because when you try to make it point north it would point down or somewhere else. Picture is below
And the winning script is:
--- Code: ---datablock ParticleEmitterData(LightLightAmbientEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 1;
velocityVariance = 0.5;
ejectionOffset = 0.3;
thetaMin = 89.7;
thetaMax = 90.3;
phiReferenceVel = 0; //360
phiVariance = 360;
overrideAdvance = false;
particles = LightLightAmbientParticle;
uiName = "LightLight Ambient";
};
--- End code ---
This script will work 100% of the time, but you will have to set the direction.
One final note:
I have absolutely no idea as to why setting the values within the console would suddenly cause it to work. As I just showed, your entire method was wrong. So why would setting the thetamax value to a number it already is, and that number being redundant, fix anything at all?
heedicalking:
Yea but i'm using it as an emitter mounted to the player's hand, like a light ring around the player's hand.
Iban:
--- Quote from: heedicalking on March 13, 2011, 10:32:35 AM ---Yea but i'm using it as an emitter mounted to the player's hand, like a light ring around the player's hand.
--- End quote ---
This, again, is present in ZAPT coding.
--- Code: ---if(!isObject(ZombieSmokeImage))
{
datablock ShapeBaseImageData(ZombieSmokeImage)
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;
mountPoint = $BackSlot;
offset = "0.00 -1.00 0.50";
rotation = "1 0 0 0";
stateName[0] = "Ready";
stateTimeoutValue[0] = 0.01;
stateTransitionOnTimeout[0] = "FireA";
stateName[1] = "FireA";
stateEmitter[1] = ZombieSmokerTrailEmitter;
stateEmitterTime[1] = 0.9;
stateTimeoutValue[1] = 0.9;
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = true;
stateName[2] = "Done";
stateTimeoutValue[2] = 0.01;
stateTransitionOnTimeout[2] = "FireA";
};
}
--- End code ---
Change it to something you'd need, like this.
--- Code: ---if(!isObject(FistHaloImage))
{
datablock ShapeBaseImageData(FistHaloImage)
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;
mountPoint = $RightHandSlot;
offset = "0.00 0.00 0.00";
rotation = "1 0 0 0";
stateName[0] = "Ready";
stateTimeoutValue[0] = 0.01;
stateTransitionOnTimeout[0] = "FireA";
stateName[1] = "FireA";
stateEmitter[1] = FistHaloEmitter;
stateEmitterTime[1] = 0.9;
stateTimeoutValue[1] = 0.9;
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = true;
stateName[2] = "Done";
stateTimeoutValue[2] = 0.01;
stateTransitionOnTimeout[2] = "FireA";
};
}
--- End code ---
Treynolds416:
--- Quote from: heedicalking on March 13, 2011, 10:32:35 AM ---Yea but i'm using it as an emitter mounted to the player's hand, like a light ring around the player's hand.
--- End quote ---
There is no way to do this in the manner that you were doing.
I didn't fully understand Iban's post, but you will probably have to set the emitter direction in the scripts.
Iban:
--- Quote from: Treynolds416 on March 13, 2011, 11:24:49 AM ---There is no way to do this in the manner that you were doing.
--- End quote ---
What.
All he was trying to do up until the post I just quoted was to get it spin in the way he wanted. I just gave him the code for mounting particle effects to the player.