The Agent Tool  1.01
An Agent Based Graphic Sound Synthesis Environment
Functions
LuaApi.hpp File Reference

Go to the source code of this file.

Functions

void initai ()
 This MUST be called at the start of each Agent script. This initializes the parent script so that it is interpreted as an Agent by the system.
float getDT ()
 A utility and timing function that provides the delta between the current frame and the previous (i.e time elapsed). Delta between now and previous frame.
int getID ()
 A crucial function allowing an Agent to obtain its own ID. Provides the unique identifier for the currently active Agent.
bool hasChildren ()
 Returns whether the current Agent has any children. Returns whether the current Agent has any children.
bool hasChildrenID (int ID)
 Indicates whether an Agent, specified by an ID has any children. Indicates whether an Agent, specified by an ID has any children.
int numberOfChildren ()
 Returns the number of children of the currently active Agent Returns the number of children of the currently active Agent.
int numberOfChildrenID (int ID)
 Provides access to the number of children of a specified Agent. Provides access to the number of children of a specified Agent.
int getChild (int childIndex)
 Allows you to obtain the unique ID of a child Agent. Allows you to obtain the unique ID of a child Agent through a relative index. For example, you can obtain the second child through getChild(1)
int getChildID (int childID, int parentID)
 Allows you to obtain the child of another Agent. Allows you to obtain a child from any Agent if its ID is known.
int getParent ()
 Allows an Agent to obtain the ID of its parent. Allows an Agent to obtain the ID of its parent.
int getParentID (int childID)
 Allows an Agent to obtain the ID of a parent of another if its ID is known. Allows an Agent to obtain the ID of a parent of another if its ID is known.
void die ()
 Kills the currently active Agent. Kills the currently active Agent.
void killID (int agentID)
 Allows an Agent to kill another Agent if its ID is known. Allows an Agent to kill another Agent if its ID is known.
int spawn (int parentID, int nodeType, string agentFunctionName, int xPos, int yPos)
 Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
int spawn (int parentID, int nodeType, string agentFunctionName, Vec2 position)
 Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
int spawnRelative (int parentID, int nodeType, string agentFunctionName, int xPos, int yPos)
 Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).
int spawnRelative (int parentID, int nodeType, string agentFunctionName, Vec2 position)
 Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).
int spawnP (table propertyTable, int parentID, int nodeType, string agentFunctionName, int xPos, int yPos)
 Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
int spawnP (table propertyTable, int parentID, int nodeType, string agentFunctionName, Vec2 position)
 Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
int spawnRelativeP (table propertyTable, int parentID, int nodeType, string agentFunctionName, int xPos, int yPos)
 Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
int spawnRelativeP (table propertyTable, int parentID, int nodeType, string agentFunctionName, Vec2 position)
 Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
float getLifetime ()
 Allows an Agent to obtain how long it has been alive in seconds. Allows an Agent to obtain how long it has been alive in seconds.
float getLifetimeID (int ID)
 Allows an Agent to obtain how long another Agent has been alive in seconds. Allows an Agent to obtain how long another Agent has been alive in seconds.
Vec2 getPosition ()
 Allows an Agent to quickly obtain its position. Allows an Agent to quickly obtain its position.
Vec2 getPositionID (int ID)
 Allows Agents to quickly obtain the position of any given Agent. Allows Agents to quickly obtain the position of any given Agent.
void setPosition (int xPos, int yPos)
 Allows an Agent to set its position. (Deprecated) Allows an Agent to set its position. This is deprecated, uses should use setP, specifying the position property. i.e setP("pos" Vec2.new(100,100))
void setPositionID (int xPos, int yPos, int ID)
 Allows an Agent to set the position of another Agent. Allows an Agent to set the position of another Agent. This is deprecated, uses should use setP, specifying the position property. i.e setPID("pos",Vec2.new(200,200),ID).
void move (int x, int y)
 Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
void move (Vec2 delta)
 Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
void moveID (int x, int y, int ID)
 Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
void moveID (Vec2 delta, int ID)
 Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
void initP (table propertyTable)
 Initializes the Agent with a suite of provided properties. Allows a function to be intialized as an Agent with a set of properties that are provided in a table of key value pairs {key=value}.
void initPID (table propertyTable, int ID)
 Allows an Agent to initialize another Agent with a suite of properties. Allows an Agent to initialize another Agent with a suite of properties that are stored in a table of key value pairs {key=value}.
void addP (string propertyID, bool value)
 Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
void addP (string propertyID, int value)
 Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
void addP (string propertyID, float value)
 Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
void addP (string propertyID, string value)
 Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
void addP (string propertyID, Vec2 value)
 Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
void addP (table propertyTable)
 Allows an Agent to add table of new properties. Allows an Agent to add table of new properties in key value pairs {key=value}. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (string propertyID, bool value, int ID)
 Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (string propertyID, int value, int ID)
 Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (string propertyID, float value, int ID)
 Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (string propertyID, string value, int ID)
 Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (string propertyID, Vec2 value, int ID)
 Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void addPID (table propertyTable, int ID)
 Allows an Agent to add table of new properties to another Agent. Allows an Agent to add table of new properties in key value pairs {key=value} to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
void setP (string propertyID, bool value)
 Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setP (string propertyID, int value)
 Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setP (string propertyID, float value)
 Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setP (string propertyID, string value)
 Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setP (string propertyID, Vec2 value)
 Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setPID (string propertyID, bool value, int ID)
 Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setPID (string propertyID, int value, int ID)
 Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setPID (string propertyID, float value, int ID)
 Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setPID (string propertyID, string value, int ID)
 Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setPID (string propertyID, Vec2 value, int ID)
 Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
void setP (table propertyTable)
 Allows an Agent to set a table of properties. Allows an Agent to set a table of new properties. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set the arguments of the same names to the proposed values.
void setPID (table propertyTable, int ID)
 Allows an Agent to set a table of properties in a specified Agent. Allows an Agent to set a table of new properties in a specified Agent. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set arguments of the same name to the proposed values.
bool getP (string propertyName)
 Allows an Agent to obtain the value of a property. Allows an Agent to obtain the value of a property, which can be a bool, int, float, string or Vec2.
bool getPID (string propertyName, int ID)
 Allows an Agent to obtain the value of a property which belongs to another Agent. Allows an Agent to obtain the value of a property, belonging to another Agent. This value can be a bool, int, float, string or Vec2.
void changeMotionModel (string modelType)
 Allows an Agent to switch between types of motion. Allows an Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.
void changeMotionModelID (string modelType, int ID)
 Allows a specified Agent to switch between types of motion Allows a specified Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.
void scNew (string synthName, int nodeID)
 Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index. Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index.
void scSet (string argName, float value, int nodeID)
 Allows an Agent to set the argument of a SuperCollider node. Allows an Agent to set the argument of a SuperCollider node.
void scFree (int nodeID)
 Kills the SuperCollider node with the ID provided. Kills the SuperCollider node with the ID provided.
int getNearest (Vec2 point)
 Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of another Agent, closest to the provided position.
int getNearest ()
 Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of the closest other Agent.
int getNearestID (int ID)
 Allows you to obtain the closest Agent to a specified Agent. Allows you to obtain the closest Agent to a specified Agent.
void drawRelativeID (int screenIndex, Vec2 relativePos, int r, int g, int b, int ID)
 Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.
void drawRelativeID (int screenIndex, Vec2 relativePos, RGBA colourData, int ID)
 Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.
void drawRelative (int screenIndex, Vec2 relativePos, int r, int g, int b, int ID)
 Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.
void drawRelative (int screenIndex, Vec2 relativePos, RGBA colourData, int ID)
 Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.
int getRedFromPoint (int screenIndex, Vec2 point)
 Allows an Agent to extract the red component of a point on a given screen canvas. Allows an Agent to extract the red component of a point on a given screen canvas.
int getGreenFromPoint (int screenIndex, Vec2 point)
 Allows an Agent to extract the green component of a point on a given screen canvas. Allows an Agent to extract the green component of a point on a given screen canvas.
int getBlueFromPoint (int screenIndex, Vec2 point)
 Allows an Agent to extract the blue component of a point on a given screen canvas. Allows an Agent to extract the blue component of a point on a given screen canvas.
int getTotalFromPoint (int screenIndex, Vec2 point)
 Allows the extraction of the total/sum of all three colour components at a given point. Allows the extraction of the total/sum of all three colour components at a given point.
float getMeanFromPoint (int screenIndex, Vec2 point)
 Allows the extraction of the mean/average of all three colour components at a given point. Allows the extraction of the mean/average of all three colour components at a given point.
int getR (int screenIndex)
 Returns the red component at an Agents current position. Returns the red component at an Agents current position.
int getRID (int screenIndex, int ID)
 Returns the red component at a specified Agents position. Returns the red component at a specified Agents position.
int getG (int screenIndex)
 Returns the green component at an Agents current position. Returns the green component at an Agents current position.
int getGID (int canvasIndex, int agentID)
 Returns the green component at a specified Agents position. Returns the green component at a specified Agents position.
int getB (int canvasIndex)
 Returns the blue component at an Agents current position. Returns the blue component at an Agents current position.
int getBID (int canvasIndex, int agentID)
 Returns the blue component at a specified Agents position. Returns the blue component at a specified Agents position.
int getTotalCol (int screenIndex)
 Allows the extraction of the total/sum of all three colour components at the Agents position. Allows the extraction of the total/sum of all three colour components at the Agents position.
int getTotalID (int screenIndex, int agentID)
 Allows the extraction of the total/sum of all three colour components at a specified Agents position. Allows the extraction of the total/sum of all three colour components at a specified Agents position.
int getMeanColID (int agentID)
 Allows the extraction of the mean/average of all three colour components at the position of a specified Agent. Allows the extraction of the mean/average of all three colour components at the position of a specified Agent.
int getMeanCol ()
 Allows the extraction of the mean/average of all three colour components at the position of the current Agent. Allows the extraction of the mean/average of all three colour components at the position of the current Agent.
RGBA getRGBA (int screenIndex)
 Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position.
RGBA getRGBA (Vec2 position, int screenIndex)
 Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position.
RGBA getRGBAID (int screenIndex, int agentID)
 Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent.
table getNearby (int radius)
 Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius. Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius.
table getNearby (int radius, Vec2 position)
 Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point.
table getNearbyID (int radius, int agentID)
 Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent.
Vec2 getWorldSize ()
 Allows an Agent to obtain the size of the current world. Allows an Agent to obtain the size of the current world.
void oscSF (string ipAddress, string portNumber, string path, string stringData, float number)
 Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void oscF (string ipAddress, string portNumber, string path, float number)
 Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void oscSI (string ipAddress, string portNumber, string path, string stringData, int number)
 Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void oscI (string ipAddress, string portNumber, string path, int number)
 Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void oscSS (string ipAddress, string portNumber, string path, string stringData, string secondStringData)
 Allows the sending of two string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a pair of strings via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void oscS (string ipAddress, string portNumber, string stringData)
 Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
void killChildren ()
 Kills all of the current Agent's children. Kills all of the current Agent's children.
void killChildrenID (int agentID)
 Kills all of the specified Agents children. Kills all of the specified Agents children.
void addPathPoint (int pathIndex, int xPos, int yPos)
 Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.
void addPathPoint (int pathIndex, int Vec2)
 Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.
void removePathPoint (int pathIndex, int pointIndex)
 Allows an Agent to remove a point in a path. Allows an Agent to remove a point in a path.
void movePathPoint (int pathIndex, int pointIndex, int xPos, int yPos)
 Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.
void movePathPoint (int pathIndex, int pointIndex, Vec2 position)
 Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.
int addPath (int xPos, int yPos)
 Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.
int addPath (Vec2 position)
 Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.
void removePath (int pathIndex)
 Allows an Agent to remove/delete a path with a given index. Allows an Agent to remove/delete a path with a given index.
void movePath (int pathIndex, int xDelta, int yDelta)
 Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.
void movePath (int pathIndex, Vec2 delta)
 Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.
bool hasP (string propertyName)
 Allows an Agent to check whether it has a property with a specified name. Allows an Agent to check whether it has a property with a specified name.
bool hasPID (string propertyName)
 Allows an Agent to check whether another Agent contains a property with a specified name. Allows an Agent to check whether another Agent contains a property with a specified name.
string getType ()
 Allows an Agent to obtain its own type. Allows an Agent to obtain its own type.
string getTypeID ()
 Allows an Agent to obtain the type of another Agent. Allows an Agent to obtain the type of another Agent.
void send (string ipAddress, string portNumber, string path,...data)
 Allows an Agent to send OSC data to a specified IPAddress, port and path. Allows an Agent to send OSC data to a specified IPAddress, port and path. A user can append as many pieces of data to send as they wish. This data can be numbers, strings and tables containing key value pairs of data. e.g send("127.0.0.1","8000","/example",100,"hello",3.14159,{more=info,data=200} )
int currentScreen ()
 Allows an Agent to obtain the index of the currently visible screen. Allows an Agent to obtain the index of the currently visible screen.
void drawLine (int screenIndex, Vec2 startPosition, Vec2 endPosition, int red, int green, int blue)
 Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.
void drawLine (int screenIndex, Vec2 startPosition, Vec2 endPosition, RGBA colourData)
 Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.
void drawRect (int screenIndex, Vec2 bottomLeft, Vec2 topRight, int red, int green, int blue, int thickness)
 Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.
void drawRect (int screenIndex, Vec2 bottomLeft, Vec2 topRight, RGBA colourData, int thickness)
 Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.
void drawCircle (int screenIndex, Vec2 centrePosition, int radius, int red, int green, int blue, int thickness)
 Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.
void drawCircle (int screenIndex, Vec2 centrePosition, int radius, RGBA colourData, int thickness)
 Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.

Detailed Description


Function Documentation

void addP ( string  propertyID,
bool  value 
)

Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
void addP ( string  propertyID,
int  value 
)

Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
void addP ( string  propertyID,
float  value 
)

Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
void addP ( string  propertyID,
string  value 
)

Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
void addP ( string  propertyID,
Vec2  value 
)

Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
void addP ( table  propertyTable)

Allows an Agent to add table of new properties. Allows an Agent to add table of new properties in key value pairs {key=value}. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyTableA table of property key value pairs
int addPath ( int  xPos,
int  yPos 
)

Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.

Returns:
The index of the newly created path
Parameters:
xPosCartesian X coordinate
yPosCartesian Y coordinate
int addPath ( Vec2  position)

Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.

Returns:
The index of the newly created path
Parameters:
positionFirst point of the new path
void addPathPoint ( int  pathIndex,
int  xPos,
int  yPos 
)

Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.

Returns:
void
Parameters:
pathIndexIndex of the path to use
xPosCartesian X coordinate
yPosCartesian Y coordinate
void addPathPoint ( int  pathIndex,
int  Vec2 
)

Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.

Returns:
void
Parameters:
pathIndexIndex of the path to use
Vec2Point to add
void addPID ( string  propertyID,
bool  value,
int  ID 
)

Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
IDID for the specified Agent
void addPID ( string  propertyID,
int  value,
int  ID 
)

Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
IDID for the specified Agent
void addPID ( string  propertyID,
float  value,
int  ID 
)

Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
IDID for the specified Agent
void addPID ( string  propertyID,
string  value,
int  ID 
)

Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
IDID for the specified Agent
void addPID ( string  propertyID,
Vec2  value,
int  ID 
)

Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe initial value of the property
IDID for the specified Agent
void addPID ( table  propertyTable,
int  ID 
)

Allows an Agent to add table of new properties to another Agent. Allows an Agent to add table of new properties in key value pairs {key=value} to another Agent. The property can be of the following types: bool, float, int, string, Vec2.

Returns:
void
Parameters:
propertyTableA table of property key value pairs
IDID for the specified Agent
void changeMotionModel ( string  modelType)

Allows an Agent to switch between types of motion. Allows an Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.

Returns:
void
Parameters:
modelTypeString representing the type of motion model
void changeMotionModelID ( string  modelType,
int  ID 
)

Allows a specified Agent to switch between types of motion Allows a specified Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.

Returns:
void
Parameters:
modelTypeString representing the type of motion model
IDID for the specified Agent
int currentScreen ( )

Allows an Agent to obtain the index of the currently visible screen. Allows an Agent to obtain the index of the currently visible screen.

Returns:
Index of the currently visible screen
void die ( )

Kills the currently active Agent. Kills the currently active Agent.

Returns:
void
void drawCircle ( int  screenIndex,
Vec2  centrePosition,
int  radius,
int  red,
int  green,
int  blue,
int  thickness 
)

Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
centrePositionCentre of the circle
radiusRadius of the circle
redAmount of red to draw
greenAmount of green to draw
blueAmount of blue to draw
thicknessThickness of the border
void drawCircle ( int  screenIndex,
Vec2  centrePosition,
int  radius,
RGBA  colourData,
int  thickness 
)

Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
centrePositionCentre of the circle
radiusRadius of the circle
colourDataColour data to draw
thicknessThickness of the border
void drawLine ( int  screenIndex,
Vec2  startPosition,
Vec2  endPosition,
int  red,
int  green,
int  blue 
)

Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
startPositionStarting position
endPositionEnd Position
redAmount of red to draw
greenAmount of green to draw
blueAmount of blue to draw
void drawLine ( int  screenIndex,
Vec2  startPosition,
Vec2  endPosition,
RGBA  colourData 
)

Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
startPositionStarting position
endPositionEnd Position
colourDataColour data to draw
void drawRect ( int  screenIndex,
Vec2  bottomLeft,
Vec2  topRight,
int  red,
int  green,
int  blue,
int  thickness 
)

Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
bottomLeftBottom left of the rectangle
topRightTop right of the rectangle
redAmount of red to draw
greenAmount of green to draw
blueAmount of blue to draw
thicknessThickness of the border
void drawRect ( int  screenIndex,
Vec2  bottomLeft,
Vec2  topRight,
RGBA  colourData,
int  thickness 
)

Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
bottomLeftBottom left of the rectangle
topRightTop right of the rectangle
colourDataColour data to draw
thicknessThickness of the border
void drawRelative ( int  screenIndex,
Vec2  relativePos,
int  r,
int  g,
int  b,
int  ID 
)

Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
relativePosThe relative position to draw
rRed component
gGreen component
bBlue component
IDID for the specified Agent
void drawRelative ( int  screenIndex,
Vec2  relativePos,
RGBA  colourData,
int  ID 
)

Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
relativePosThe relative position to draw
colourDataColour data to draw
IDID for the specified Agent
void drawRelativeID ( int  screenIndex,
Vec2  relativePos,
int  r,
int  g,
int  b,
int  ID 
)

Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
relativePosThe relative position to draw
rRed component
gGreen component
bBlue component
IDID for the specified Agent
void drawRelativeID ( int  screenIndex,
Vec2  relativePos,
RGBA  colourData,
int  ID 
)

Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.

Returns:
void
Parameters:
screenIndexIndex of the screen to draw on
relativePosThe relative position to draw
colourDataColour data to draw
IDID for the specified Agent
int getB ( int  canvasIndex)

Returns the blue component at an Agents current position. Returns the blue component at an Agents current position.

Returns:
Returns the blue component at an Agents current position.
Parameters:
canvasIndexIndex of the screen
int getBID ( int  canvasIndex,
int  agentID 
)

Returns the blue component at a specified Agents position. Returns the blue component at a specified Agents position.

Returns:
Returns the blue component at a specified Agents position.
Parameters:
canvasIndexIndex of the screen
agentIDID for the specified Agent
int getBlueFromPoint ( int  screenIndex,
Vec2  point 
)

Allows an Agent to extract the blue component of a point on a given screen canvas. Allows an Agent to extract the blue component of a point on a given screen canvas.

Returns:
The green component of a given point.
Parameters:
screenIndexIndex of the screen
pointThe point in question
int getChild ( int  childIndex)

Allows you to obtain the unique ID of a child Agent. Allows you to obtain the unique ID of a child Agent through a relative index. For example, you can obtain the second child through getChild(1)

Returns:
ID of a child Agent.
Parameters:
childIndexThe index of the child
int getChildID ( int  childID,
int  parentID 
)

Allows you to obtain the child of another Agent. Allows you to obtain a child from any Agent if its ID is known.

Returns:
ID of a child Agent
Parameters:
childIDThe child ID relative to the parent.
parentIDThe ID of the parent.
float getDT ( )

A utility and timing function that provides the delta between the current frame and the previous (i.e time elapsed). Delta between now and previous frame.

Returns:
The delta between now and the previous frame.
int getG ( int  screenIndex)

Returns the green component at an Agents current position. Returns the green component at an Agents current position.

Returns:
Returns the green component at an Agents current position.
Parameters:
screenIndexIndex of the screen
int getGID ( int  canvasIndex,
int  agentID 
)

Returns the green component at a specified Agents position. Returns the green component at a specified Agents position.

Returns:
Returns the green component at a specified Agents position.
Parameters:
canvasIndexIndex of the screen
agentIDID for the specified Agent
int getGreenFromPoint ( int  screenIndex,
Vec2  point 
)

Allows an Agent to extract the green component of a point on a given screen canvas. Allows an Agent to extract the green component of a point on a given screen canvas.

Returns:
The green component of a given point.
Parameters:
screenIndexIndex of the screen
pointThe point in question
int getID ( )

A crucial function allowing an Agent to obtain its own ID. Provides the unique identifier for the currently active Agent.

Returns:
The unique identifier of the currently active Agent.
float getLifetime ( )

Allows an Agent to obtain how long it has been alive in seconds. Allows an Agent to obtain how long it has been alive in seconds.

Returns:
The time which the Agent has been alive
float getLifetimeID ( int  ID)

Allows an Agent to obtain how long another Agent has been alive in seconds. Allows an Agent to obtain how long another Agent has been alive in seconds.

Returns:
The time which the specified Agent has been alive
Parameters:
IDID of the Agent
int getMeanCol ( )

Allows the extraction of the mean/average of all three colour components at the position of the current Agent. Allows the extraction of the mean/average of all three colour components at the position of the current Agent.

Returns:
The mean/average across all three colour components.
int getMeanColID ( int  agentID)

Allows the extraction of the mean/average of all three colour components at the position of a specified Agent. Allows the extraction of the mean/average of all three colour components at the position of a specified Agent.

Returns:
The mean/average across all three colour components.
Parameters:
agentIDID of the specified Agent
float getMeanFromPoint ( int  screenIndex,
Vec2  point 
)

Allows the extraction of the mean/average of all three colour components at a given point. Allows the extraction of the mean/average of all three colour components at a given point.

Returns:
The mean/average across all three colour components.
Parameters:
screenIndexIndex of the screen
pointThe point in question
table getNearby ( int  radius)

Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius. Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius.

Returns:
Table containing the ID's of Agents within a radius.
Parameters:
radiusRadius of the area to search
table getNearby ( int  radius,
Vec2  position 
)

Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point.

Returns:
Table containing the ID's of Agents within a radius of a position.
Parameters:
radiusRadius of the area to search
positionCentre position of the area to search
table getNearbyID ( int  radius,
int  agentID 
)

Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent.

Returns:
Table containing the ID's of Agents within a radius around the specified Agent.
Parameters:
radiusRadius of the area to search
agentIDID for the specified Agent
int getNearest ( Vec2  point)

Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of another Agent, closest to the provided position.

Returns:
The ID of the Agent closest
Parameters:
pointThe point you wish to test against.
int getNearest ( )

Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of the closest other Agent.

Returns:
The ID of the Agent closest
int getNearestID ( int  ID)

Allows you to obtain the closest Agent to a specified Agent. Allows you to obtain the closest Agent to a specified Agent.

Returns:
The ID of the Agent closest
Parameters:
IDID for the specified Agent
Vec2 getP ( string  propertyName)

Allows an Agent to obtain the value of a property. Allows an Agent to obtain the value of a property, which can be a bool, int, float, string or Vec2.

Returns:
Returns the value of the property specified
Parameters:
propertyNameThe name of the properties whose value you want to obtain
int getParent ( )

Allows an Agent to obtain the ID of its parent. Allows an Agent to obtain the ID of its parent.

Returns:
The ID of the Agents parent.
int getParentID ( int  childID)

Allows an Agent to obtain the ID of a parent of another if its ID is known. Allows an Agent to obtain the ID of a parent of another if its ID is known.

Returns:
The ID of Parent for a specified Agent
Parameters:
childIDThe ID of the child whose parent you wish to obtain.
Vec2 getPID ( string  propertyName,
int  ID 
)

Allows an Agent to obtain the value of a property which belongs to another Agent. Allows an Agent to obtain the value of a property, belonging to another Agent. This value can be a bool, int, float, string or Vec2.

Returns:
Returns the value of the property specified
Parameters:
propertyNameThe name of the properties whose value you want to obtain
IDID for the specified Agent
Vec2 getPosition ( )

Allows an Agent to quickly obtain its position. Allows an Agent to quickly obtain its position.

Returns:
The position of the currently active Agent.
Vec2 getPositionID ( int  ID)

Allows Agents to quickly obtain the position of any given Agent. Allows Agents to quickly obtain the position of any given Agent.

Returns:
The position of the specified Agent
Parameters:
IDThe ID of the Agent in question
int getR ( int  screenIndex)

Returns the red component at an Agents current position. Returns the red component at an Agents current position.

Returns:
Returns the red component at an Agents current position.
Parameters:
screenIndexIndex of the screen
int getRedFromPoint ( int  screenIndex,
Vec2  point 
)

Allows an Agent to extract the red component of a point on a given screen canvas. Allows an Agent to extract the red component of a point on a given screen canvas.

Returns:
The red component of a given point.
Parameters:
screenIndexIndex of the screen
pointThe point in question
RGBA getRGBA ( int  screenIndex)

Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position.

Returns:
Colour data at the Agents current position
Parameters:
screenIndexIndex of the screen
RGBA getRGBA ( Vec2  position,
int  screenIndex 
)

Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position.

Returns:
Colour data at a position
Parameters:
positionposition of the data to extract
screenIndexIndex of the screen
RGBA getRGBAID ( int  screenIndex,
int  agentID 
)

Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent.

Returns:
Colour data at the position of the specified Agent
Parameters:
screenIndexIndex of the screen
agentIDID for the specified Agent
int getRID ( int  screenIndex,
int  ID 
)

Returns the red component at a specified Agents position. Returns the red component at a specified Agents position.

Returns:
Returns the red component at a specified Agents position.
Parameters:
screenIndexIndex of the screen
IDID for the specified Agent
int getTotalCol ( int  screenIndex)

Allows the extraction of the total/sum of all three colour components at the Agents position. Allows the extraction of the total/sum of all three colour components at the Agents position.

Returns:
The total (sum) of the colour components
Parameters:
screenIndexIndex of the screen
int getTotalFromPoint ( int  screenIndex,
Vec2  point 
)

Allows the extraction of the total/sum of all three colour components at a given point. Allows the extraction of the total/sum of all three colour components at a given point.

Returns:
The total (sum) of the colour components
Parameters:
screenIndexIndex of the screen
pointThe point in question
int getTotalID ( int  screenIndex,
int  agentID 
)

Allows the extraction of the total/sum of all three colour components at a specified Agents position. Allows the extraction of the total/sum of all three colour components at a specified Agents position.

Returns:
The total (sum) of the colour components
Parameters:
screenIndexIndex of the screen
agentIDID for the specified Agent
string getType ( )

Allows an Agent to obtain its own type. Allows an Agent to obtain its own type.

Returns:
The type of Agent (the name)
string getTypeID ( )

Allows an Agent to obtain the type of another Agent. Allows an Agent to obtain the type of another Agent.

Returns:
The type of Agent (the name)
Vec2 getWorldSize ( )

Allows an Agent to obtain the size of the current world. Allows an Agent to obtain the size of the current world.

Returns:
The size of the current world
bool hasChildren ( )

Returns whether the current Agent has any children. Returns whether the current Agent has any children.

Returns:
Whether the current Agent has any children
bool hasChildrenID ( int  ID)

Indicates whether an Agent, specified by an ID has any children. Indicates whether an Agent, specified by an ID has any children.

Returns:
Returns whether an Agent has any children.
Parameters:
IDID of the Agent
bool hasP ( string  propertyName)

Allows an Agent to check whether it has a property with a specified name. Allows an Agent to check whether it has a property with a specified name.

Returns:
Returns whether a property exists in the current Agent
Parameters:
propertyNameName of the property to check
bool hasPID ( string  propertyName)

Allows an Agent to check whether another Agent contains a property with a specified name. Allows an Agent to check whether another Agent contains a property with a specified name.

Returns:
Returns whether a property exists in the specified Agent
Parameters:
propertyNameName of the property to check
void initai ( )

This MUST be called at the start of each Agent script. This initializes the parent script so that it is interpreted as an Agent by the system.

Returns:
void
void initP ( table  propertyTable)

Initializes the Agent with a suite of provided properties. Allows a function to be intialized as an Agent with a set of properties that are provided in a table of key value pairs {key=value}.

Returns:
void
Parameters:
propertyTableA table of property key value pairs
void initPID ( table  propertyTable,
int  ID 
)

Allows an Agent to initialize another Agent with a suite of properties. Allows an Agent to initialize another Agent with a suite of properties that are stored in a table of key value pairs {key=value}.

Returns:
void
Parameters:
propertyTableA table of property key value pairs
IDID for the specified Agent
void killChildren ( )

Kills all of the current Agent's children. Kills all of the current Agent's children.

Returns:
void
void killChildrenID ( int  agentID)

Kills all of the specified Agents children. Kills all of the specified Agents children.

Returns:
void
Parameters:
agentIDID for the specified Agent
void killID ( int  agentID)

Allows an Agent to kill another Agent if its ID is known. Allows an Agent to kill another Agent if its ID is known.

Returns:
void
Parameters:
agentIDThe ID of the Agent you wish to kill.
void move ( int  x,
int  y 
)

Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.

Returns:
void
Parameters:
xAmount to move in the x plane
yAmount to move in the y plane
void move ( Vec2  delta)

Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.

Returns:
void
Parameters:
deltaDelta to move by
void moveID ( int  x,
int  y,
int  ID 
)

Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.

Returns:
void
Parameters:
xAmount to move in the x plane
yAmount to move in the y plane
IDThe ID of the Agent
void moveID ( Vec2  delta,
int  ID 
)

Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.

Returns:
void
Parameters:
deltaDelta to move the specified Agent by
IDThe ID of the Agent
void movePath ( int  pathIndex,
int  xDelta,
int  yDelta 
)

Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.

Returns:
void
Parameters:
pathIndexIndex of the path to move
xDeltaCartesian X delta
yDeltaCartesian Y delta
void movePath ( int  pathIndex,
Vec2  delta 
)

Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.

Returns:
void
Parameters:
pathIndexIndex of the path to move
deltaDelta to move the path by
void movePathPoint ( int  pathIndex,
int  pointIndex,
int  xPos,
int  yPos 
)

Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.

Returns:
void
Parameters:
pathIndexIndex of the path to use
pointIndexIndex of the point to move int the path
xPosCartesian X coordinate
yPosCartesian Y coordinate
void movePathPoint ( int  pathIndex,
int  pointIndex,
Vec2  position 
)

Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.

Returns:
void
Parameters:
pathIndexIndex of the path to use
pointIndexIndex of the point to move int the path
positionPosition to move the point to
int numberOfChildren ( )

Returns the number of children of the currently active Agent Returns the number of children of the currently active Agent.

Returns:
The number of children.
int numberOfChildrenID ( int  ID)

Provides access to the number of children of a specified Agent. Provides access to the number of children of a specified Agent.

Returns:
The number of children.
Parameters:
IDParent ID
void oscF ( string  ipAddress,
string  portNumber,
string  path,
float  number 
)

Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
numbernumber you wish to send
void oscI ( string  ipAddress,
string  portNumber,
string  path,
int  number 
)

Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
numbernumber you wish to send
void oscS ( string  ipAddress,
string  portNumber,
string  stringData 
)

Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
stringDatastring of data
void oscSF ( string  ipAddress,
string  portNumber,
string  path,
string  stringData,
float  number 
)

Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
stringDatastring containing the potential parameter name
numbernumber you wish to send
void oscSI ( string  ipAddress,
string  portNumber,
string  path,
string  stringData,
int  number 
)

Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
stringDatastring containing the potential parameter name
numbernumber you wish to send
void oscSS ( string  ipAddress,
string  portNumber,
string  path,
string  stringData,
string  secondStringData 
)

Allows the sending of two string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a pair of strings via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
stringDatastring containing the potential parameter name
secondStringDatastring of data
void removePath ( int  pathIndex)

Allows an Agent to remove/delete a path with a given index. Allows an Agent to remove/delete a path with a given index.

Returns:
void
Parameters:
pathIndexIndex of the path to remove
void removePathPoint ( int  pathIndex,
int  pointIndex 
)

Allows an Agent to remove a point in a path. Allows an Agent to remove a point in a path.

Returns:
void
Parameters:
pathIndexIndex of the path to use
pointIndexIndex of the point to remove from the path
void scFree ( int  nodeID)

Kills the SuperCollider node with the ID provided. Kills the SuperCollider node with the ID provided.

Returns:
void
Parameters:
nodeIDThe SuperCollider NodeId you wish to kill.
void scNew ( string  synthName,
int  nodeID 
)

Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index. Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index.

Returns:
void
Parameters:
synthNameThe name of the synth
nodeIDThe SuperCollider NodeId you wish to use.
void scSet ( string  argName,
float  value,
int  nodeID 
)

Allows an Agent to set the argument of a SuperCollider node. Allows an Agent to set the argument of a SuperCollider node.

Returns:
void
Parameters:
argNameThe name of the argument
valueThe argument value
nodeIDThe SuperCollider NodeId you wish to use.
void send ( string  ipAddress,
string  portNumber,
string  path,
  data 
)

Allows an Agent to send OSC data to a specified IPAddress, port and path. Allows an Agent to send OSC data to a specified IPAddress, port and path. A user can append as many pieces of data to send as they wish. This data can be numbers, strings and tables containing key value pairs of data. e.g send("127.0.0.1","8000","/example",100,"hello",3.14159,{more=info,data=200} )

Returns:
void
Parameters:
ipAddressIP address of the machine you wish to connect to
portNumberThe port you wish to connect to
pathThe path you wish to send via
dataVariadic data of type float, integer, string or a table containing key value pairs of data
void setP ( string  propertyID,
bool  value 
)

Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
void setP ( string  propertyID,
int  value 
)

Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
void setP ( string  propertyID,
float  value 
)

Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
void setP ( string  propertyID,
string  value 
)

Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
void setP ( string  propertyID,
Vec2  value 
)

Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
void setP ( table  propertyTable)

Allows an Agent to set a table of properties. Allows an Agent to set a table of new properties. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set the arguments of the same names to the proposed values.

Returns:
void
Parameters:
propertyTableA table of key value properties
void setPID ( string  propertyID,
bool  value,
int  ID 
)

Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
IDID for the specified Agent
void setPID ( string  propertyID,
int  value,
int  ID 
)

Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
IDID for the specified Agent
void setPID ( string  propertyID,
float  value,
int  ID 
)

Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
IDID for the specified Agent
void setPID ( string  propertyID,
string  value,
int  ID 
)

Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
IDID for the specified Agent
void setPID ( string  propertyID,
Vec2  value,
int  ID 
)

Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.

Returns:
void
Parameters:
propertyIDThe name of the new property
valueThe new value for the property
IDID for the specified Agent
void setPID ( table  propertyTable,
int  ID 
)

Allows an Agent to set a table of properties in a specified Agent. Allows an Agent to set a table of new properties in a specified Agent. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set arguments of the same name to the proposed values.

Returns:
void
Parameters:
propertyTableA table of key value properties
IDID for the specified Agent
void setPosition ( int  xPos,
int  yPos 
)

Allows an Agent to set its position. (Deprecated) Allows an Agent to set its position. This is deprecated, uses should use setP, specifying the position property. i.e setP("pos" Vec2.new(100,100))

Returns:
void
Parameters:
xPosX cartesian coordinate
yPosY cartesian coordinate
void setPositionID ( int  xPos,
int  yPos,
int  ID 
)

Allows an Agent to set the position of another Agent. Allows an Agent to set the position of another Agent. This is deprecated, uses should use setP, specifying the position property. i.e setPID("pos",Vec2.new(200,200),ID).

Returns:
void
Parameters:
xPosX cartesian coordinate
yPosY cartesian coordinate
IDThe ID of the Agent
int spawn ( int  parentID,
int  nodeType,
string  agentFunctionName,
int  xPos,
int  yPos 
)

Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
xPosCartesian X coordinate
yPosCartesian Y coordinate
int spawn ( int  parentID,
int  nodeType,
string  agentFunctionName,
Vec2  position 
)

Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
positionA vector representing the position
int spawnP ( table  propertyTable,
int  parentID,
int  nodeType,
string  agentFunctionName,
int  xPos,
int  yPos 
)

Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
propertyTableA table of property key value pairs
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
xPosCartesian X coordinate
yPosCartesian Y coordinate
int spawnP ( table  propertyTable,
int  parentID,
int  nodeType,
string  agentFunctionName,
Vec2  position 
)

Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
propertyTableA table of property key value pairs
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
positionGlobal position
int spawnRelative ( int  parentID,
int  nodeType,
string  agentFunctionName,
int  xPos,
int  yPos 
)

Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).

Returns:
The ID of the newly created Agent
Parameters:
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
xPosRelative X position
yPosRelative Y position
int spawnRelative ( int  parentID,
int  nodeType,
string  agentFunctionName,
Vec2  position 
)

Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).

Returns:
The ID of the newly created Agent
Parameters:
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
positionRelative position
int spawnRelativeP ( table  propertyTable,
int  parentID,
int  nodeType,
string  agentFunctionName,
int  xPos,
int  yPos 
)

Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
propertyTableA table of key value properties
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
xPosRelative X coordinate
yPosRelative Y coordinate
int spawnRelativeP ( table  propertyTable,
int  parentID,
int  nodeType,
string  agentFunctionName,
Vec2  position 
)

Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.

Returns:
The ID of the newly created Agent
Parameters:
propertyTableA table of key value properties
parentIDThe ID of the new Agents parent
nodeTypeShould be set to 1 for Agents
agentFunctionNameThe name of the ai_function to use
positionRelative position
 All Classes Files Functions