3ds Max 2012 Bible - Kelly L. Murdock [450]
7. Drag the Find Target action from the Depot pane, and drop it at the bottom of the Event01 node. This adds a new Find Target icon to the viewports. Select the Find Target icon in the viewports, and move it to the lantern flame's position. Select Group⇒Attach, and click the lantern object to add the Find Target icon to the lantern group. This makes the target move with the lantern. Enable the Use Cruise Speed option, and then set the Speed to 1000 with a Variation of 50 and the Accel Limit to 5000 with an Ease % of 50. You also need to enable the Follow Target Animation option.
8. Drag the Material Dynamic from the Depot pane to the Event Display pane, and drop it outside the Event01 node to create a new node called Event02. In the Parameters pane, enable the Assign Material button and click the material button. Select the Flash material from the Material/Map Browser (select the Material Editor option to see the sample slot materials). Then drag a wire from Event01 to Event02.
9. Drag the Age Test action from the Depot pane, and drop it below the Material Dynamic action. Then select Event Age from the drop-down list in the Parameters pane, and set the Test Value to 2.
10. Finally, drag the Delete action from the Depot pane, and drop it away from the other events. Then wire Event02 to the new event node, and select the Selected Particles Only option in the Parameters pane.
Figure 41.21 shows several moths eagerly pursuing the swinging lantern.
FIGURE 41.21
All the moths in this scene are particles and are following a target linked to the lantern.
Debugging test actions
Any test action can be made to return a True or False value if you click the left (for True) or right (for False) side of the test action's icon in the Particle View interface. This lets you debug the particle flow. Tests set to be true show an icon with a green light, and tests set to be false show a red light icon.
Tutorial: Firing at a fleeing spaceship
Well, it is about time for a space scene, and we all know that lots of particles float around out in space—stars, asteroids, comets, and so forth. It's all great stuff to animate. For this scene, you use the Particle Flow feature to fire laser blasts on a fleeing spaceship.
To use Particle Flow to fire on a fleeing spaceship, follow these steps:
1. Open the Fleeing spaceship.max file from the Chap 41 directory on the CD.
This file includes a spaceship model created by Viewpoint Datalabs that has been animated as if it were fleeing.
2. Select Create⇒Particles⇒Particle Flow Source, and drag in the Front viewport to create the emitter. With the Select and Move (W) button selected, move the emitter until it is aligned with the end of the laser gun. Then click the Select and Link button, and drag from the emitter to the gun object to bind the emitter to the gun.
The emitter now moves with the animated laser gun.
3. With the Particle Flow Source icon selected, open the Modify panel and click the Particle View button in the Setup rollout (or press the 6 key) to open the Particle View interface.
4. In the Event01 node, select the Birth 03 event; in the Parameters panel, set the Emit Stop to 100 and the Amount to 50. This produces a laser blast every two frames. Click the blue dot in the lower-right corner of the Event node, and select a red color from the Color Selector that appears.
5. Select Create⇒Standard Primitives⇒Cylinder, and drag in the Front viewport to create a Cylinder object. In the Hierarchy panel, select the Affect Pivot Only button and rotate the Cylinder's Pivot Point until its Y-axis points at the spaceship. Then in the Particle View window, drag the Shape Instance event from the depot and drop it on top of the Shape event in the Event 01 node. This replaces the Shape event with a Shape Instance event. In the Parameters rollout, click the Particle Geometry Object button and select the Cylinder object. Select the Rotation event, and delete it with the Delete key.
6. Select Create⇒Space Warps⇒Deflectors⇒SOmniFlect, and drag in the Top