MAXScript Extensions > MAXScript Extensions for Particle Flow > Particle Flow Interfaces > Interfaces >

# Interface: action

The action Interface is exposed in all Particle Flow Action Classes.

Methods:

    <bool>init <IObject>container <object>particleSystem <node>particleSystemNode <&object array>actions <&node array>actionNodes

    actions is In and Out parameter
    actionNodes is In and Out parameter

Initializes the Action.

Lets you calls the Init method of an Action from inside a Script_Operator’s on Init... handler.

For an example, see Speed Operator in Script Operator Example

    <bool>release <IObject>container

Releases the specified particle container.

Lets you call the Release method of an Action from inside a Script_Operator’s on Release... handler.

For an example, see Speed Operator in Script Operator Example

    <interval by value>activityInterval ()

Returns the activity interval.

    <bool>isFertile()

Returns True if the action is fertile (generates particles).

    <bool>isNonExecutable()

Returns True if the action is non executable.

    <bool>supportRand()

Returns True if the action supports randomization.

    <integer>getRand()

Returns the current random seed value.

    <void>setRand <integer>randomSeed

Sets the random seed to the supplied integer value.

    <integer>newRand()

Generates a new random seed and returns its value.

    <bool>isMaterialHolder()

Returns True if the action is a material holder.

    <material>getMaterial()

Returns the material if the action is a material holder.

This method is not supported by actions for which .isMaterialHolder() returns False.

    <bool>setMaterial <material>material

Sets the material, returns True when successful.

This method is not supported by actions for which .isMaterialHolder() returns False.

    <bool>supportScriptWiring()

Returns True if the action supports script wiring.

    <void>setUseScriptWiring <bool>useState

Sets the "Use Script Wiring" option exposed in the right-click menu of the action.

Usable only when .supportScriptWiring() returns True.

When set to True, additional controls will be displayed in the action's User Interface and can be set via MAXScript to control certain operations using scripted particle channels data.

When set to False, the additional controls will be hidden and scripted channels will not be used.

    <void>makeUnique()

Converts an instanced action to a copy that's unique to its event.

EXAMPLES AND RESULTS
    --Create a Find_Target action
    ft = find_target()
    --> $Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]
    --Create a Birth_Script action
    bs = birth_script()
    --> $Birth_Script:Birth Script 01 @ [0.000000,0.000000,0.000000]
    --Create a Material_Dynamic action
    md = material_dynamic()
    --> $Material_Dynamic:Material Dynamic 01 @ [0.000000,0.000000,0.000000]
    --Create a Force action
    fc = force()
    --> $Force:Force 01 @ [0.000000,0.000000,0.000000]
    --Does it create particle?
    --No, Find_Target doesn’t
    ft.isFertile()
    --> false
    bs.isFertile()
    --> true
    --Are they non-executable?
    ft.isNonExecutable()
    --> false
    bs.isNonExecutable()
    --> false
    --Do they support randomization?
    ft.supportRand()
    --> true
    --Does this Action support Randomization? Yes!
    bs.supportRand()
    --> true
    --Get the current random seed of the Find_Target
    ft.getRand()
    --> 12345
    --Set a new random seed
    ft.setRand 23456
    --> OK
    --Get the new random seed
    ft.getRand()
    --> 23456
    --Generate new random seed
    ft.newRand()
    --> 30642
    --Get the new random seed
    ft.getRand()
    --> 30642
    --Check if the action is a material holder - This one isn’t...
    ft.isMaterialHolder()
    --> false
    --...But this one is
    md.isMaterialHolder()
    --> true
    --This one doesn’t have a material assigned yet &endash;
    -- nothing to get yet.
    md.getMaterial()
    --> undefined
    --Assign a new material
    md.setMaterial (standard name:"PF")
    --> true
    --Now try to get the material again - It is there now!
    md.getMaterial()
    --> PF:Standard
    --Does Find_Target support Wiring?
    --No, it doesn’t.
    ft.supportScriptWiring()
    --> false
    --Does Force support Wiring?
    --Yes, it does!
    fc.supportScriptWiring()
    --> true

This Interface is available in:

Age_Test : Helper Birth : Helper Birth_Group : Helper BirthGrid : Helper Birth_Paint : Helper Birth_Script : Helper BirthStream : Helper Birth_Texture : Helper Cache : Helper Cache_Disk : Helper Cache_Selective : Helper Camera_Culling : Helper Camera_IMBlur : Helper Collision : Helper Collision_Spawn : Helper | Copy_Out : Helper Data_Icon : Helper Data_Operator : Helper Data_Test : Helper DeleteParticles : Helper Find_Target : Helper Force : Helper Go_To_Rotation : Helper Initial_State : Helper Keep_Apart : Helper mapping : Helper Material_Dynamic : Helper Material_Frequency : Helper Material_Static : Helper mP_Buoyancy : Helper mP_Collision : Helper | mP_Drag : Helper mP_Force : Helper mP_Glue : Helper mP_InterCollision : Helper mP_Shape : Helper mP_Solvent : Helper mP_Switch : Helper mP_World : Helper Notes : Helper PF_Source : GeometryClass Position_Icon : Helper Position_Object : Helper rotation : Helper Scale_Test : Helper | Script_Test : Helper Script_Operator : Helper Send_Out : Helper shapeStandard : Helper Shape_Facing : Helper Shape_Instance : Helper Shape_Mark : Helper Spawn : Helper speed : Helper SpeedByIcon : Helper Speed_By_Surface : Helper Speed_Test : Helper Split_Amount : Helper Split_Selected : Helper Split_Source : Helper

#### See Also

- Particle Flow Interfaces

- Speed Operator in Script Operator Example