Pyrogenesis Object Model : EntityCollection class

The EntityCollection class is based on an array holding the entities that are members of the set (accessed using subscript notation). It does also include the following supplemental properties in order to control entity interaction from script.

EntityCollection Methods

toString (Implicit)

  • Overview:
    • Overrides the default string conversion to include the number of entities in the set.
  • Syntax:
    • toString();
  • Parameters:
    • None.
  • Returns:*
    • A string of the form '[object EntityCollection: <Number> entities]'.Notes:

This function is called implicitly by the JavaScript engine to convert this object to a string.

isOrderTypeValid

  • Overview:
    • Returns a value indicating whether the specified order type is valid for the selection and current target.
  • Syntax:
    • selection.isOrderTypeValid( code );
  • Parameters:
    • code: An integer giving the code of the order to check.
  • Returns:
    • True, if the order is valid for the current selection and target. False otherwise.
  • Notes:
    • Use of this method is only valid on EntityCollections representing the current user selection (i.e. the selection object). The current target is the entity or map location the user cursor is currently over.

EntityCollection Properties

orderType

  • Overview:
    • Gets or sets a value representing the currently active context-sensitive order.
  • Type:
    • integer
  • Notes:
    • Use of this property is only valid on EntityCollections representing the current user selection (i.e. the selection object). -1 indicates that no context-sensitive order cursor is to be displayed. The sets of values that are valid for this property are dependant on the current selection and object(s) the mouse is over; for this reason, this property may be changed whenever the cursor is moved.
Last modified 16 years ago Last modified on Feb 23, 2008, 4:19:00 AM
Note: See TracWiki for help on using the wiki.