Attributes of Agents

Attributes
You define the kind of properties an agent can have using the ATTR command, and you decide on a value from the ATTR table that describes what kind of properties an agent will have.

The ATTR table in the CAOS Language Guide should explain the settings, this section is designed to illustrate some of the meanings behind the values - and in the case of the physics setting illustrate how the properties can alter the behaviour of an agent.

Remember: to give an agent ATTR settings just add up the numbers for the settings you want. For example, if you want something that can be picked up by other agents and the hand (but no other attributes) then you use the command ATTR 3. Similarly, if you want something that responds to physics and room boundaries then you would use the command ATTR 192.

1 - Carryable
With this setting the agent can be picked up by other agents. For example, the Gosh-hawk carries the Grazer's to its nest ... this is only achievable because the Grazer has an attribute setting that allows it to be carried. If the default position for the object being carried looks wrong then you can use the PUHL command to alter whereabouts on the agent it is carried, and PUPT on the carrying agent to define which point it will carry agents from.
This setting does not mean that a creature can carry the object, that is defined using the BHVR command.

2 - Mousable
With this attribute set the agent can be picked up by the hand - the users presence in the world. This setting does not mean that other agents can carry this object (see attribute _carryable_ above), or that a creature can pick up the agent (see BHVR). If the default position for the object being carried looks wrong then you can use the PUHL command to alter whereabouts on the agent it is carried.

4 - Activateable
This setting means that the agent will respond to events when clicked on by the hand - the nature of these events is defined using CLAC or CLIK. This setting does not mean that creatures can trigger events on the agent, this is defined using BHVR.

8 - Greedy cabin
This setting is for vehicles only (created using NEW: VHCL) and will only be relevant if the vehicle has a cabin defined (by using the CABN command). With this setting any object dropped whilst over the cabin will be picked up by the vehicle. If this setting is not used then the only way to get an object into the vehicle is by using commands such as GPAS.

16 - Invisible
With this setting the agent will be completely invisible to creatures. They will not see the object, so will not be able to perform any actions on it. The same effect can be achieved by using a classifier for the agent that is out of the creatures classification range.

32 - Floatable
With this setting the agent will maintain a position relative to the window (or another agent) rather than the world. An example of this is the user interface components (Creatures menu, Options, Inventory etc.) which are always on screen where ever you scroll. If this setting were not used then the user interface would only be accessible from one place in the world.

64 - Suffer collisions
With this setting the agent will take notice of the room system and produce collision events according to its PERM and the DOOR values of the rooms concerned. This setting has more explanation below.

128 - Suffer physics
With this setting the agent will have its velocity altered by the physics engine. This means it will suffer air resistance (AERO), acceleration due to gravity (ACCG), elasticity (ELAS) and friction (FRIC). This means that any agent who suffers physics will not retain any velocity given to it (using VELX, VELY or VELO) for long, because the engine will alter its movement. Without this setting the agent will keep any velocity given to it until further scripting takes place. This setting has more explanation below.

256 - Camera shy
With this setting the agent will not show up on remote cameras (created using PAT: CMRA) or any photographs (using SNAP).

512 - Open air cabin
This only applies to vehicles with cabins, and means that creatures can see anything that the vehicle is carrying in its cabin. It also means they can perform actions on the contents of the cabin. Without this setting creatures are unable to see into vehicles, and so can not interact with the contents.

Other properties
The attributes 'suffer physics' and 'suffer collisions' have other attributes associated with them that can drastically alter the way an agent moves within the world. This section gives an overview of the meanings and uses.

ACCG
This value defines how fast an agent will accelerate towards the ground when released. The value specified is pixels per tick per tick so, for example, an agent with ACCG 10 when released will have a downward velocity of 10 pixels on the first tick, 20 on the second tick, 30 on the third and so on. This value can be specified as a float - which means you can give values smaller than 1. i.e. ACCG 0.5.
Higher values mean the agent will fall faster, lower values mean it will drift slowly.

AERO
This value defines how affected the agent is by air resistance. The value specified is a percentage of the agents velocity, and the agents velocity will be reduced by this amount each tick. For example, AERO 50 means that an agent will lose 50% of its velocity each tick because of air resistance. AERO can be useful for reducing how far an agent can be thrown ... with a low value of AERO the agent can be propelled a long distance, but with a high AERO the agent will steadily lose velocity when propelled. Because this is a percentage the range of values is 0 to 100.

ELAS
This value is a method of defining an agents elasticity - and dictates the percentage of velocity that will be retained when the agent hits the floor. A high value for ELAS means that the agent will retain a lot of its velocity - and so bounce off the floor - whereas a low value means the agent will only retain a small amount of velocity. Because this is a percentage the range of values is 0 to 100, with 0 meaning that the agent will lose all velocity upon impact with the floor (and so not bounce).

FRIC
This defines the agents friction as a percentage of the loss felt when sliding along the floor. A value of 0 means the agent will lose none of its velocity and will slide along the floor until it reaches a level surface. A value of 100 means that the agent will lose all of its velocity and so will not slide at all.

PERM
This defines the permeability of an agent, and is a replacement of the SIZE command in C2. This value, along with the DOOR values of room joins, defines which boundaries the agent will collide with - and which it will simply pass straight through. The lower an agents PERM the more barriers it can pass through, and the higher its PERM the more restricted it is by barriers. To pass through a barrier the agent must have a PERM that is smaller than the DOOR value of the barrier. For example, all the wooden walkways in the game have a DOOR value of 50 ... this means that any agents with a PERM of 51 or greater will collide with this boundary. All agents with a PERM of 49 or less will pass straight through this boundary and not receive a collision event.