MAXScript Extensions > MAXScript Extensions for Particle Flow > Particle Flow Classes > Tests >

# Find_Target : Helper

    Find_Target - superclass: helper super-superclass:node - classID: #(1962490886, 515064320)

Value > MAXWrapper > Node > Helper > Find_Target

| Particle Flow - Quick Navigation

Description:

By default, Find_Target sends particles to a specified target or targets. Upon reaching a target, the particles become eligible for redirection to another event. You can specify that the particles should use a particular speed or time frame in moving toward the target. You can also specify where on the target the particles should go.

Alternatively, you can use Find_Target as a simple proximity test: If a particle comes within a certain distance of its target, it becomes eligible for redirection to the next event.

Constructor:

    Find_Target...

Properties:

    <Find_Target>.Speed_Type Integer default:0 -- integer

Controls the state of the drop-down list at the top of the parameters panel. It lets you choose whether to send particles to a target by specifying the speed and acceleration, or by specifying the amount of time they should take. Alternatively, by choosing No Control, you can test particles' distance from a target.

Possible values are:

0: Control By Speed - Specify speed and acceleration settings for the particles to follow while traveling to the target.

1: Control By Time - Specify time-based settings for the particles to follow while traveling to the target.

2: No Control - With this option, Find Target functions only as a proximity test. When a particle comes within the specified distance of the target, the particles become eligible for redirection to the next event.

NoteWhen you choose No Control, the Find_Target test does not affect particle speed or direction.

    <Find_Target>.Test_Type Integer default:1 -- integer

These settings let you choose which distance the Find_Target Test measures and specify the measured distance. You can choose Target Pivot or Target Point, and specify a distance with the Is Less Than setting.

0: Target Pivot - Measures the distance between the particle and the target pivot.

1: Target Point - Measures the distance between the particle and the target point.

2: Is Less Than - When particles are closer than this distance from target pivot or point, they test True and become eligible for redirection to the next event. Measured in scene units.

    <Find_Target>.Test_Distance Float default:1.0 -- animatable; world units

Specifies the distance to check against when .Test_Type is set to 2 : Is Less Than.

    <Find_Target>.Use_Cruise_Speed Boolean default:true -- boolean

When set to true , the software gives you explicit control over particle speed and speed variation. When set to false , the software calculates particle speed automatically using the .Acceleration_Limit value.

    <Find_Target>.Cruise_Speed Float default:300.0 -- animatable; world units

Get/Set the particle speed in scene units per second.

    <Find_Target>.Cruise_Speed_Variation Float default:0.0 -- animatable; world units

The amount by which the actual Speed value can vary randomly.

    <Find_Target>.Acceleration_Limit Float default:1000.0 -- animatable; world units

Sets the acceleration limit. This value impacts the inertia and speed of the particles.

    <Find_Target>.Ease_In Float default:0.0 -- animatable; percentage

Controls the rate by which particles slow down when it approaches the target point.

    <Find_Target>.Sync_Type Integer default:0 -- integer

Controls the state of the Sync By drop-down list in the UI. Specifies the time frame to use when animating .Cruise_Speed , .Cruise_Speed_Variation , and .Acceleration_Limit .

Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

    <Find_Target>.Target_Type Integer default:0 --radio button number

By default, Find_Target uses its own target icon, but you can use these controls to designate other scene objects as targets instead.

Possible values are:

0: Icon - Use the Find Target icon as the target.

1: Mesh Objects - Use one or more scene mesh objects as targets.

    <Find_Target>.Timing_Type Integer default:2 -- integer

Determines how the software applies the specified timing, defined by the Time and Variation values. The possible options are:

0: Absolute Time - Refers to the overall time of the system. Each particle will reach its target at the frame number specified by Time.

1: Particle Age - Refers to the time elapsed since the birth of the particle. Each particle will reach its target when its age reaches the value specified by Time.

2: Event Duration - Refers to the time elapsed since the particle entered the current event. Each particle will reach its target when it has been in the current for the number of frames specified by Time.

    <Find_Target>.Time Integer default:9600 -- integer

The time in ticks particles should take to reach the target.

Note

The time value is shown as frames in the UI.

    <Find_Target>.Time_Variation Integer default:800 -- integer

The time in ticks by which Time can vary randomly.

Note The time value is shown as frames in the UI.

    <Find_Target>.Subframe_Sampling Boolean default:true -- boolean

Turning this on helps avoid particle "puffing" by timing particles at a much higher subframe resolution (that is, throughout each frame), rather than using the relatively coarse frame resolution.

    <Find_Target>.Use_Docking_Speed Boolean default:false --boolean

Lets you specify particles' speed when they reach the target.

A particle might be required to reach the target from a specific direction at a specific speed. When Use Docking Speed is off, the software calculates a path for particles to reach the target in the shortest distance with the least acceleration along the path. When Use Docking Speed is on, the software calculates particles' final speed when they reach the target using the Speed and Variation parameters.

    <Find_Target>.Docking_Speed Float default:100.0 -- animatable; world units

The speed of particles when they reach the target in scene units per second.

    <Find_Target>.Docking_Speed_Variation Float default:0.0 -- animatable; world units

The amount by which the actual Speed value can vary randomly.

    <Find_Target>.Target_Objects Array default:#() --node array; SubAnim

Sets the list of target scene mesh objects.

    <Find_Target>.Target_Sync_Type Integer default:0 -- integer

Specifies the time frame to use when sending particles toward animated objects when using Animated_Shape or Follow_Target.

Possible values are:

0: Absolute Time - Animation derived from the target is applied to particles immediately.

1. Particle Age - Animation derived from the target is applied to particles at the corresponding frames of each particle's existence.

2: Event Duration - Animation derived from the target is applied to particles is applied to each particle starting when it first enters the event.

    <Find_Target>.Animated_Shape Boolean default:false

Turn on to allow particles to target the surface of an object whose form is animated by scaling, by morphing, or with modifiers. This requires more computation, because the destination must be updated at every integration step.

    <Find_Target>.Follow_Target Boolean default:false -- boolean

Turn on to allow particles to follow a moving target; that is, a target whose location is animated. This requires more computation, because the destination must be updated at every integration step.

    <Find_Target>.Lock_On_Target Boolean default:true --boolean

When on, the software calculates each particle's target point once: when the particle enters the event. Thereafter, the particle is "locked on" to its target. When off, the software can continually recalculate the target point for each particle. Available only when Follow Target Animation is on.

    <Find_Target>.Aim_Point_Type Integer default:0

Lets you specify where on its target a particle should land.

Possible values are:

0: Random - Each particle targets a random point on the target.

1: Closest Surface - Each particle targets the nearest point of the target’s surface.

2: By Script Vector - The target point is defined using a script operator in the same event that sets a position. See particleVector Sample Script for an example.

    <Find_Target>.Assignment_Type Integer default:0 -- integer

With multiple mesh targets, lets you specify how the software should choose among them. Available only when targeting more than one object.

0: Random - For each particle, the software chooses a target object at random.

1: Closest Pivot - For each particle, the software chooses as its target the object whose pivot is nearest to the particle.

2: Closest Surface - For each particle, the software chooses as its target the object whose surface is nearest to the particle.

3: Least Deviation - For each particle, the software chooses as its target the object that requires the least change in its current direction (or resteering) to reach.

4: By Script Integer - For each particle, the choice of a targeted object is defined by a script operator that sets an index. This index corresponds to a target-object entry position in the target list. See particleInteger Sample Script for an example.

    <Find_Target>.Docking_Type Integer default:0 -- integer

Lets you specify from which direction particles should approach targets.

Possible values are:

0: None Specified - No docking constraints. Particles reach their targets in the most efficient way, based on their assigned parameters and their current attributes.

1: Along Icon Arrow - The final direction is the same as the Find Target icon arrow.

2: Icon Spherical - The final direction points toward the center of the operator icon.

3: Icon Cylindrical - The final direction points toward the icon arrow as a line, thus forming a cylindrical field with the arrow as the cylinder's main axis.

4: Surface Normals - Each particle reaches its target point from a direction perpendicular to the surface at that point.

    <Find_Target>.Docking_Distance Float default:10.0 -- animatable; world units

The distance from the target at which particles begin docking behavior. This includes the docking direction, and, when using Control By Time, the docking speed.

    <Find_Target>.Icon_Size Float default:30.0 --animatable; world units

Set the size of the Find Target icon. This affects particle behavior when using the icon as the target.

    <Find_Target>.Color_Type Boolean default:true -- boolean

When set to true , the Find_Target icon uses the color of the event containing the test as defined by its local Display operator, if one exists. This applies even if the Display operator is turned off. When off, the Find Target icon uses the default Test Gizmos color as defined in Customize User Interface > Colors.

    <Find_Target>.Random_Seed Integer default:12345 -- integer

Sets the randomization value.

## Find_Target Interfaces:

The following Interfaces are exposed by the Find_Target Class:

Interface: action

Interface: test

Interface: PViewItem

#### See Also

- Particle Flow Classes