Rik's Treehouse > Babbling in Binary > My Software > Orphanware > R2DToo > R2DToo Help > For the Programmer > getAgentAbout

getAgentAbout

Declaration
Parameters
Return Value
Remarks
Revisions
Example
See Also

Declaration

char* __stdcall getAgentAbout(
    int x,        // x-coordinate of agent
    int y,        // y-coordinate of agent
    pState state, // array of agent state variables
    int index     // return information on state[index]
);
Top of page

Parameters

x,y
Coordinates of agent.
state
Array of agent state variables.
index
Index of state variable about which to return information.
Top of page

Return Value

A character string returning information on state variable state[index]. Top of page

Remarks

This optional function may be provided by the model. For each possible value of index the function should return a character string with background information on the agent state variable state[index] which is the state of the agent at coordinates (x,y). The information is displayed in R2DToo's "Inspect Sites" dialog box to help the user.
Top of page

Revisions

API v1.5
  • new! Replaces aboutState.
Top of page

Example

char* __stdcall getAgentAbout(int x, int y, pState state, int index) { switch (index) { case 0: switch(int(state[0])) { case 0: return "Rock."; case 1: return "Paper."; case 2: return "Scissors."; default:return "Unknown."; } default:return "Unknown."; } } Top of page

See Also

getAgentHint.
Top of page
[Rik's Office Hours] [Contact Rik]
Last updated: Fri Apr 30 2004, 1:37pm