Click or drag to resize
GeneralRulesSetTargetParameterFor Method
Set the value of a numeric property or parameter on a sprite selected with SelectTargetSpriteFor(SpriteCollection, Int32, String) to the specified value.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void SetTargetParameterFor(
	string ParameterName,
	int Value,
	string TargetName
)

Parameters

ParameterName
Type: SystemString
Name of the parameter on the target sprite that will be affected.
Value
Type: SystemInt32
Numeric value that will be assigned to the specified parameter.
TargetName
Type: SystemString
Determines which target's currently selected sprite will be affected.
Remarks
This is useful for a wide range of effects on sprites in collections. For example, after determining that some sprite in a collection is within a plan using GetSpriteWithin(SpriteCollection, RelativePosition, Int32), you could use SelectTargetSpriteFor(SpriteCollection, Int32, String) and this to set some parameter on that sprite to trigger its rules to react. Remember that ParameterName and TargetName are provided as strings, and must be quoted assuming the names are provided as literal values.
See Also