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

# Collision_Spawn : Helper

    Collision_Spawn - superclass: helper; super-superclass:node - 21:0 - classID: #(1962490884, 515064320)

Value > MAXWrapper > Node > Helper > Collision_Spawn

| Particle Flow - Quick Navigation

Description:

Collision_Spawn creates new particles from existing ones that collide with one or more Deflector Space Warps. You can specify different post-collision behavior for the colliding particles and their offspring. Each spawned particle is born at the same location as its parent, and has the same orientation and shape. Collision_Spawn can give the spawned particles a different speed and scaling factor. If you wire the Collision_Spawn test to another event, spawned particles are sent to that event, where you can specify different properties for the new particles.

Constructor:

    Collision_Spawn...

Properties:

    <Collision_Spawn>.True_for_Particles_Collided Boolean default: false -- boolean

When true, parent particles qualify for redirection when the test conditions are met. Available with the Spawn On First Collision option only when Delete Parent is false .

    <Collision_Spawn>.True_for_Spawn_Particles Boolean default: true -- boolean

When true, spawned particles qualify for redirection when the test conditions are met.

    <Collision_Spawn>.Collision_Nodes ArrayParameter default: #() -- node array; alias:deflectorNodes; SubAnim

Get/Set the list of Deflectors used as Collision Nodes.

    <Collision_Spawn>.Spawn_Type Integer default: 0 -- radio button number

Controls the state of the Spawn On... radio buttons in the UI.

Possible values are:

0: Spawn On First Collision - Particles spawn only the first time they collide with a deflector.

1: Spawn On Each Collision - Particles spawn on each of multiple collisions, up to a limit specified with the Number of Collision parameter.

    <Collision_Spawn>.Number_of_Collisions Integer default: 3 -- integer

Sets the number of collisions up to which particles will spawn when .Spawn_Type is set to 1 : Spawn On Each Collision.

    <Collision_Spawn>.Delete_Parent Boolean default: true -- boolean

Controls the state of the Delete Parent checkbox in the UI. When set to true , deletes each original particle from which a new one is spawned. Available only when Spawn_Type is set to 0 : Spawn On First Collision option.

    <Collision_Spawn>.Divergence Float default: 12.0 -- animatable; angle;

Spreads out the stream of spawned particles. The value defines the extent of the divergence in degrees. Range is from 0 to 180.

    <Collision_Spawn>.Spawn_Able Float default: 100.0 -- animatable; percentage

Defines the percentage of particles in the current event that will spawn new particles. This is determined once for each particle, when it enters the event. However, the parameter is animatable.

    <Collision_Spawn>.Number_of_Offsprings Integer default: 1 -- animatable; integer

The number of new particles the system creates from each parent particle for each spawning event.

    <Collision_Spawn>.Offsprint_Variation Float default: 0.0 -- animatable; percentage

The amount by which the .Number_of_Offsprings value can vary randomly.

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

Defines the time frame to use when animating .Number_of_Offsprings and .Offsprings_Variation .

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.

    <Collision_Spawn>.Restart_Particle_Age Boolean default: true -- boolean

When set to true , sets the age of each newly spawned particle at 0. When false , each spawned particle inherits its parent's age.

    <Collision_Spawn>.Parent_Speed Integer default: 0 -- integer

Controls the state of the Parent drop-down list in the UI. Defines the parent's behavior. Available only when Delete Parent is off. Possible values are:

0: Bounce - The speed and direction after collision is determined by the deflector properties.

1: Continue - Particle speed and direction are unaffected by the collision.

    <Collision_Spawn>.Offspring_Speed Integer default: 0 -- integer

Controls the state of the Offspring drop-down list in the UI. Defines the new spawned particles’ behavior.

Possible values are:

0: Bounce - The speed and direction of offspring after collision is determined by the deflector properties.

1: Continue - Speed and direction of offspring are unaffected by the collision.

    <Collision_Spawn>.Speed_Type Integer default: 1 -- radio button number

Controls the state of the Speed Type radio buttons.

Possible values are:

0: In Units &endash; Use the .Speed value.

1: Inherited &endash; Use the .Speed_Inherited value.

    <Collision_Spawn>.Speed Float default: 100.0 -- animatable; world units

Choose this to specify the speed of spawned particles in system units per second. A positive value inherits the parent's direction; a negative value reverses it.

    <Collision_Spawn>.Speed_Inherited Float default: 100.0 -- animatable; percentage

Choose this to specify each spawned particle's speed as a percentage of its parent's speed. A positive value inherits the parent's direction; a negative value reverses it.

    <Collision_Spawn>.Speed_Variation Float default: 0.0 -- animatable; percentage

The amount by which a spawned particle's speed can vary randomly.

    <Collision_Spawn>.Scale_Factor Float default: 100.0 -- animatable; percentage

Controls the amount of uniform scaling to apply to each spawned particle, as a percentage of its parent's size.

    <Collision_Spawn>.Scale_Variation Float default: 0.0 -- animatable; percentage

The amount by which a spawned particle's scale can vary randomly.

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

Specifies a randomization value.

## Collision_Spawn Interfaces:

The following Interfaces are exposed by the Collision_Spawn Class:

Interface: action

Interface: integrator

Interface: PViewItem

Interface: test

#### See Also

- Particle Flow Classes