Download Renque user`s guide

Transcript
Renque user's guide
7.5 Entity procedures
Entity procedures are called on an entity object. They are used to obtain information
on the status of the referenced entity or to cause the entity to undergo some
transformation. Entity references are obtained from the Item procedure of the
Residents, RuleResidents and Travels assemblies, the object procedures
SelectedResident, UniteEntity, and from the global procedure
ScriptEntity. The following Entity procedures are defined:
Object-referencing procedures
Icon
Property(Object). Returns or sets the Icon property of the entity as specified by the
argument Object. The argument is passed as object reference to a picture
component. For this property the default entity icon is referenced by Void.
Host
Function(Object). Returns the storage location of the entity. If the entity is stored in a
link or server object, the function returns the object; if the entity is not stored it returns
Void.
Source
Function(Object). Returns the link object by which the entity was created. The
function returns Void if the Tracking property was not applied to the creating link
when the entity was created.
Property-referencing procedures
Identifier
Property(String). Returns or assigns a unique identifier string to an entity. The
procedure accepts any non-empty string value that does not contain the dot
character as argument. The property assignment raises an error if the assigned
string is used as identifier by another entity.
ResidentsIndex
Function(Integer). Returns the position of the entity in the Residents assembly of its
host. The function returns the value zero if the entity is not stored in a server or link
object.
RuleResidentsIndex
Function(Integer). Returns the position of the entity in the RuleResidents assembly of
the host server of the entity. The function returns the value zero if the entity has no
host server, or the entity is not a member of RuleResidents assembly of the host
server. The function can only be called within a Select collect incident script of a
server.
TravelsIndex
Function(Integer). Returns the position of the entity in the Travels assembly of the
link on which it travels. The function returns the value zero if the entity is not
traveling.
Entry
Function(Floating point). Returns the simulation time at which the entity was stored in
its Host. The procedure causes a runtime error if the entity is not stored in a host
object.
Departure
Property(Floating point). Returns or assigns the projected simulation time for
dispatch or expiration of the entity. The Void value signifies that no dispatch or
- 125 -