I just can't seem to get this to work. Like my previous two threads (I sincerely hope I'm not spamming...), I figure the problem must be simple, but it doesn't seem to work.
I cannibalized code from Ability Bots (
https://forum.blockland.us/index.php?topic=292925.0 ), specifically the Phase C bot, to try to get a similar effect.
I want a playertype that's phased and has an emitter attached to it, but the actual process of mounting the image seems different for players than bots.
Sorry to bother you again, forum! But can you help?
datablock PlayerData(PlayerCauchemar : PlayerStandardArmor)
{
uiName = "Cauchemar";
canJet = 0;
rechargeRate = 0;
showEnergyBar = false;
maxdamage = 9999;
};
datablock ParticleData(CauchemarParticle)
{
textureName = "base/data/particles/dot";
dragCoefficient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
windCoefficient = 0;
constantAcceleration = 0;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
spinSpeed = 0;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
useInvAlpha = false;
colors[0] = "0.32 0 1 1.0";
colors[1] = "0.49 0 1 0.85";
colors[2] = "0.74 0 1 0.0";
sizes[0] = 0.2;
sizes[1] = 0.15;
sizes[2] = 0.1;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(CauchemarEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = -10.0;
velocityVariance = 0.0;
ejectionOffset = 10.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 720;
phiVariance = 360;
overrideAdvance = false;
particles = "CauchemarParticle";
//useEmitterColors = True;
useEmitterColors = False;
uiName = "Cauchemar";
};
datablock ShapeBaseImageData( CauchemarImage )
{
shapeFile = "base/data/shapes/empty.dts";
emap = false;
mountPoint = 7;//$HeadSlot; //i want it to spawn the emitter on his torso, so instead of "4", a foot, it's "2", the torso
//alternatively i can set it to "7" for his pants
offset = "0 0 0";
rotation = "1 0 0 180";
stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.1;
stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Ready";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.1;
stateEmitter[1] = CauchemarEmitter; //wandExplosionEmitter; //PlayerJetEmitter;
//this is the only thing i'll change probably
//you can change the "A" to letters A-F
//those are all the emitters.
stateEmitterTime[1] = 1000;
// stateName[2] = "Done";
// stateScript[2] = "onDone";
};
function PlayerCauchemar::onAdd(%this,%obj)
{
armor::onAdd(%this,%obj);
%obj.mountImage( CauchemarImage, 2);
GameConnection::ApplyBodyParts(%obj);
GameConnection::ApplyBodyColors(%obj);
//this is the glitchy phase effect
//allows the bot to be a portal to the skybox
%obj.setNodeColor("ALL", "0 0 0 0");
}