path_setedge(ENTITY*,var node,var edge,var* skills)

path_getedge(ENTITY*,var node,var edge,var* skills)

Retrieves or sets length, weight, and skill values from a path edge.


ENTITY* - pointer of an entity attached to a path.
node - number of the node (1 == first node of the path).
edge - number of the edge (1 == first edge of the node).
skills - var[3] or VECTOR* to receive or set the length, weight, and skill values.


0 if the edge does not exist, otherwise nonzero.

Modifies (path_getedge):

skills[0] - set to the edge length.
skills[1] - set to the edge weight.
skills[2] - set to the edge skill.

Modifies (path_setedge):

edge length - set from skills[0] if nonzero. Use a negative value for a bidirectional and a positive value for a unidirectional edge.
edge weight - set from skills[1].
edge skill - set from skills[2].




The number of edges of a node can be determined by calling path_getedge with increasing edge numbers until 0 is returned.


path_setedge(my,1,1,vector(1, 5, 2));

See also:

path_scan, path_nextnode ► latest version online