Click or drag to resize
GeneralRulesSelectTargetSpriteFor Method
Selects a sprite within a collection, using a 0-based index, to be the target of SetTargetParameterFor(String, Int32, String). TargetName allows any number of unique targets to be selected by assigning unique names.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version:
public virtual bool SelectTargetSpriteFor(
	SpriteCollection Sprites,
	int Index,
	string TargetName


Type: (Default Namespace)SpriteCollection
Collection from which sprite is selected
Type: SystemInt32
0-based index within the collection of the sprite to be selected
Type: SystemString
A global name (quoted string) to indicate for what this sprite is being selected

Return Value

Type: Boolean
True if the specified index is within the bounds of the collection, False otherwise.
If the Index is beyond the bounds of the collection, the target reference cleared. This function is useful in conjunction with SetTargetParameterFor(String, Int32, String) and GetTargetParameterFor(String, String) to set properties of arbitrary sprites within a collection to trigger various behaviors based on their rules, or get properties to affect the currently executing rules based on other sprites. TargetName allows you to select any number of sprites by assigning each a globally unique name to be used by any plan or sprite rules. Only one sprite can ever be associated with that target name at a time. Assigning another to that name will replace the existing target with the new one. Specify -1 for Index to clear selection for the specified target.
See Also