Tutorial 30: Using Particles & the Triangle Highlighter

NPSIMPLE=[path/filename]
NP=[id],[submodel],[surface],[flags],[path/filename]
NPFF=[id],[msec]
NPKILL
NPKILL=[id]

important console commands
flushparticles
r_speeds 1
shownames [model path]

You will need Joey’s Particle docs to fully understand all the things particleman can do. It truly is an amazing tool.
2 things that particle man does that you should learn.

1) make particles (duh)
2) select surfaces on models

to Find particleman, it is in the root directory of Anox.

Go make particle and save it.

NPSIMPLE=[path/filename]

To attach a particle to a model
Newscript
Newent=ob_squib;floor=0
Put a cmd node at 2.0
npsimple=343/dockshiplite

Play this

Try moving the squib around by dropping some nodes and examine the particle as it moves.

Npsimple will attach a particle to the Origin point of ANY model that is on that path.
To KILL that particle on the model, put a node at 5.0 secs
NPKILL

Thass all!

NOTE: there is a special flag in the particle generator. Under the variations tab. Movement based flow. If it is set to ‘by velocity’, then the FASTER you make the squib move, it will generate more particles. It LOOKS awesome when you play with it, but sometimes if you move the squib too fast, it will generate particles in the thousands…. THOUSANDS!!!! Thass a little more than a small CPU can handle. Take care with velocity based particles. If you have to have a bunch, make em real small and away from the camera.

A good console command to use in the r_speeds command.

Bring down the console and type
r_speeds 1

The last value displayed at the top is the AMOUNT pf particles being drawn on the screen.
Play the script again and watch the number. The great thing about that particle is that it has 2 generators, one that is always on and One that spurts when there is velocity. So if you moved the squib very fast, you should see a bunch more particles that look different. Take a look at those r_speed values.

NP=[id],[submodel],[surface],[flags],[path/filename]

Now lets change the squib to a visable model. The dockship

Newent=ob_dockshiplite;floor=0
But that particle needs to come out of the engines. Certain models anox have actual names for special surfaces. To find out the names, use the shownames console command.
Shownames models\objects\dockshiplite.md2

AND you can look it up in particle man by loading up the model and selecting the ‘selector’ tab and examine the tagged surfaces pull down.

Change the cmd node at 2.0 to read
Np=101,0,fx_1,0,343/dockshiplite

The ID is 101, this can be any number you assign it.
I have always used ‘0’ for SUBMODEL, dunno what it does.
Fx_3 is the SURFACE you are attaching the particle to.
I have always used ‘0’ for FLAGS
343/dockshiplite is the path and filename of the particle used.

Play the script, make sure the dockship is moving. Now change the node to read this.
Np=101,0,fx_1,0,343/dockshiplite;Np=102,0,fx_2,0,343/dockshiplite;np=103,0,fx_3,0,343/dockshiplite

All one line.

Notice that this command puts the same particle on 3 different surfaces WITH 3 separate Ids.

Put a cmd node at 8.0
Npkill=102

This will KILL only the particle with id of 102 (on surface fx_2).

If you used just
Npkill
ALL particles would be killed.

HONE YOUR SKILLZ
Load up map bricksd. There is a dockshiplite model that roams the area. Observe how it moves. Watch how the particles spit out in conjunction with its movement. That script is called ambi_bricksd. Load up map joey and move the dockship around and use particle to help ‘sell’ the movement.

Some models don’t have any special flagged surfaces. But Particle man is so damn good that you can attach a particle to a triangle on a model. Load up a model, Using the selector Tab, go click ‘highlight a specifc triangle’ and drag the slider. Once you find the surface you like you can input that triangle into Planet.

Np=101,0,#569,0,343/dockshiplite

That will put a particle on triangle number 569.

The TRIANGLE HIGHLIGHTER
Now, there is another in-engine tool called trihigh. Short for triangle highlighter.

Bring down the console and type
Exec trihigh

If there is any entity on screen, it will now have a triangle grid. You may have to just Play the script in order to see the model, so go ahead and do that. You should see a number by the model. This is the triangle. (sometimes I will set timescale to .1 to help slow down the movement)
Use the brackets {} to scroll through the triangles in increments of 10 and -= for increments of 1. Find the triangle you like, remember that number and hit ‘p’ to quit trihigh.

Be sure to look at some BANE Mystech scripts, to see some particle goodness.
(ANOX DEVELOPER NOTE: Joey’s awesome particle system came real late in the development of anox, so a bunch of us scrambled to add cool new particles to everything, I think some of the Mystech would have changed dramatically knowing what we could have done.)

???? I COULDN”T GET TRIHIGH TO WORK!!!!!!!!!!!!!!!!!!!!!!!

NOTE: if you work with the particle editor on a second computer, like I did, once you saved a change to a specific particle, and wanted to view that in an anox script you are currently working on, you will have to flush the particles out so it can reload the newly saved ones. Simply type ‘flushparticles’ in the console.

NPFF=[id],[msec]

I didn’t even know this command existed.
This is what Joey said:

new particle fast forward
force a particle to die out, for example, while offscreen.
or do really cool effects where you force say a shell of expanding particles to suddenly change in size.

Hunh....