1. WHAT
IS
AN
ATTRIBUTE?
Attributes are essentially value holders or variables, they are designed to store numerical
or text values to be used for different situations, attributes are values of actors or scenes.
Any time you need to record a number, angle or piece of text, creating a new attribute is
probably the best way to do it.
Game attributes can be accessed by all prototype and instance actors, they they can be
seen in any scene. Scene attributes are like game attributes but can only be accessed in
that particular scene. Actor attributes can only be accessed by an instance actor, but can
be initially defined and used in a prototype actor so that all instances of that prototype can
have predefined behaviors.
There are six different types of attributesBoolean: These are true/false values. One example from Pong could be the serving rule,
where false would mean player 2 is serving, and true meaning that player 1 is serving.
Text: Letter and number values.
Integer: Whole number values. Integer is one of the more versatile attributes. A few of the
many possible uses are storing the gameʼs score, specifying the number of units to spawn,
or keeping track of how many reward objects are left in a scene.
Real: Allows for decimal values. Real attributes allow developers to include fractional
events, such as time ticking down (or up).
Angles: Allows values from 0 to 359, representing the degrees of a circle. Angle attributes
are primarily used with objects that rotate or have some sort of angular movement.
Index: Positive whole numbers. These will primarily be useful once GameSalad supports
advanced features such as arrays and tables.