Author Topic: My emote  (Read 508 times)

I replaced the script from alarm with my stuff for my emote heres the script code


Please help me fix all flaws.


Code: [Select]
//Emote_Alarm.cs

datablock AudioProfile(AlarmSound)
{
filename = "./alarm.wav";
description = AudioClosest3d;
preload = true;
};

datablock ParticleData(AlarmParticle)
{
   dragCoefficient      = 5.0;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.0;
   windCoefficient      = 0;
   constantAcceleration = 0.0;
   lifetimeMS           = 500;
   lifetimeVarianceMS   = 0;
   useInvAlpha          = false;
   textureName          = "base/data/particles/exclamation";
   colors[0]     = "1 1 1 1";
   colors[1]     = "1 1 1 1";
   colors[2]     = "1 1 1 1";
   sizes[0]      = 0.9;
   sizes[1]      = 0.9;
   sizes[2]      = 0.9;
   times[0]      = 0.0;
   times[1]      = 0.2;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(AlarmEmitter)
{
   ejectionPeriodMS = 35;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   ejectionOffset   = 1.8;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = false;
   lifeTimeMS = 100;
   particles = "AlarmParticle";

   doFalloff = false; //if we do fall off with this emitter it ends up flickering, for most emitters you want this TRUE

   emitterNode = GenericEmitterNode;        //used when placed on a brick
   pointEmitterNode = TenthEmitterNode; //used when placed on a 1x1 brick

   uiName = "Emote - Alarm";
};

datablock ExplosionData(AlarmExplosion)
{
   lifeTimeMS = 2000;
   emitter[0] = AlarmEmitter;
   soundProfile = AlarmSound;
};

//we cant spawn explosions, so this is a workaround for now
datablock ProjectileData(AlarmProjectile)
{
   explosion           = AlarmExplosion;

   armingDelay         = 0;
   lifetime            = 10;
   explodeOnDeath = true;

   uiName = "Alarm Emote";
};
« Last Edit: March 27, 2011, 05:59:58 PM by Soon To Be »

Coding help topics are generally more productive if you tell us what you need help with. "Help me fix the flaws" is perhaps one of the most unhelpful help requests I've seen in a while.

I can tell you that you'll want to change all the datablock and uiNames

What is the problem exactly? It's the script for the alarm, that's all I can see.

From what I can see, you edited nothing. Therefore, if you used your emote, it would be the same as the alarm emote.
First of all, you would have to change the texture to display the path of the image you're using.

No wonder it isn't working.

Accidently posted wrong script..