Game Development Community

Add new emitters to the .mis file

by 187 · in ThinkTanks · 02/01/2004 (8:39 am) · 25 replies

datablock particledata(lightparticle)
{
  animateTexture = "0";
  animTexName[0] = "game/data/shapes/tanks/reticle.png";
  colors[0] = "0 1 0 1.000000";
  colors[1] = "0 1 0 1.000000";
  colors[2] = "0 1 0 0.385827";
  colors[3] = "0.000000 0.000000 0.000000 0.000000";
  constantAcceleration = "0";
  dragCoefficient = "0.997067";
  framesPerSec = "1";
  gravityCoefficient = "-0.20757";
  inheritedVelFactor = "0.297456";
  lifetimeMS = "500";
  lifetimeVarianceMS = "250";
  sizes[0] = "0.247922";
  sizes[1] = "0.745389";
  sizes[2] = "0.84409";
  sizes[3] = "1.54513";
  spinRandomMax = "500";
  spinRandomMin = "-90";
  spinSpeed = "1";
  textureName = "game/data/shapes/tanks/speedyprojectile.jpg";
  times[0] = "9";
  times[1] = "0.2";
  times[2] = "0.498039";
  times[3] = "1";
  useInvAlpha = "1";
  windCoefficient = "1";
};
//
//
datablock particleemitterdata(lightparticleemitter)
{
  className = "ParticleEmitterData";
  ejectionOffset = "0";
  ejectionPeriodMS = "28";
  ejectionVelocity = "1.5";
  lifetimeMS = "0";
  lifetimeVarianceMS = "0";
  orientOnVelocity = "1";
  orientParticles = "0";
  overrideAdvance = "0";
  particleFarDist = "1000";
  particles = "lightparticle";
  periodVarianceMS = "27";
  phiReferenceVel = "0";
  phiVariance = "360";
  thetaMax = "90";
  thetaMin = "90";
  useEmitterColors = "0";
  useEmitterSizes = "0";
  velocityVariance = "0.5";
};

About the author

Page «Previous 1 2
#1
02/02/2004 (11:30 am)
Thx for the info 187 =)

Cadc (sa)
#2
02/27/2004 (9:04 pm)
Yes thanks for the info but how can we add these emitters to weapons . Were exactly do we put them in the miss files, and how do we use them.
I have already used the rocksmoke emitters in my mods but these new emitters have me stumped I can't seem to get them to work. Please Help
Thank You,
Joe C.
#3
02/28/2004 (3:03 am)
Like he sed wut do they do how do ya work em, wut do they do when they r workin??

cpt Rik
#4
02/29/2004 (10:06 pm)
OK here's what you do. Just paste the scripts at the beginning of the .mis file before everything else. Then at the bottom of the .mis file enter add the emitter to a weapon like you normally would.

lightprojectile.emitter = "lightparticleemitter";

Then just modify the settings to make it look the way you want it to look.

187
#5
03/01/2004 (6:26 pm)
Thank you 187 for your reply, it was a great deal of help. Can you tell me why after
2-3 games the particles increase in size by about 3 times. They return to normal
size after I reset the game this is not so much a problem as a pain in the bum.
Thanks,
Joe Caulfield
#6
03/03/2004 (9:11 am)
Got em workin :)
how do u change d colour, is it possible?

cpt Rik
#7
03/04/2004 (7:24 am)
Above //-OBJECT-WRITE-BEGIN--?
#8
03/04/2004 (8:14 am)
Here's a better way to do it. Forget about the .mis file. Create a new file in the game/server/scripts folder called emitters.cs. Now just put that emitter data in that file then add the following line to the end of your prefs.cs file.

exec("game/server/scripts/emitters.cs");

This should take care of the increasing size problem. As far as the colors, you just change the values in the particle data block. Hope this helps.

187
#9
03/04/2004 (1:10 pm)
Don't you mean to add it to the Main.cs file?
#10
03/04/2004 (2:34 pm)
NOTHING I DO WITH EMITTERS WORKS!
#11
03/04/2004 (6:28 pm)
I'm not sure if adding it to the main.cs file will work. I thought I tried that already. Let me know if it does spunky. I'm not sure what to tell you racer445. You gotta be doing something wrong. Look in the console window for the error messages. Maybe that will help.

187
#12
03/04/2004 (9:17 pm)
The problem with colors, White 255. 255. 255 will not work. How can we convert it to a number that will work? And thank you so much, you are the best.
Joe Caulfield
#13
03/04/2004 (10:12 pm)
If you noticed there are four numbers for each color.

colors[0] = "0 1 0 1.000000";

It goes red, green, blue, alpha. The number ranges from 0 to 1. Zero being none of that color and 1 being the max for that color.

0.5 would be half. I hope I'm not making this more confusing than it really is. I don't know what alpha is for either. Anyway 1 1 1 1 would be white and 0 0 0 0 would be black.

187
#14
03/05/2004 (7:24 am)
Thx fer d tips on d colour :)
#15
03/05/2004 (9:45 am)
Wait, do i have to set up a Dedicated server to make it work? that might be why.
#16
03/05/2004 (12:16 pm)
187, do NOT add it to the Main.cs file. It severley messed up my game.
#17
03/05/2004 (10:37 pm)
OK... Well like I said, add it to the prefs.cs
#18
03/06/2004 (10:11 am)
Should the new file (emitters.cs) be a dso or cs file?
#19
03/06/2004 (8:19 pm)
@ice punk
It doesn't matter. When the game loads it it will convert it to a dso anyway.
#20
03/06/2004 (11:09 pm)
I Exec my files in the mis. works great.
Page «Previous 1 2