Attributes: are created to define the characteristics of an object/element the computer uses attributes to store the values of those characteristics
Attribute Types: tell the computer how many bits/bytes to allocate in RAM for the storage of that dataValue
Number Attribute Types: Index: stores whole numbersValue; positive (unsigned); least RAM Integer: stores whole numbersValue; positive or negative: medium RAM Real: stores whole and/or fractional/decimal numbers: positive or negative; most RAM
any numberValue can be manipulated with the operants: +, -. /(divide), *(multiply) any numberValue can interact with any other numberValue the computer will round-off fractional/decimal values for index and integer types
EX: index: Score when 0 = gameOver Integer: a value to subtract from score -3 Real: anytime a number may have to store a fractional/decimal value: $12.89 … X = 54.5 … Color.Alpha = 0.25
=== Text type attributes can store numbers … but the number can not be manipulated as they are ascii Angle type attributes can be manipulated but they are a handled differently by the computer within their specified numberValue range Enumeration type attributes (this type you can not select when adding an attribute) also store a numberValue (whole positive)
Comments
when touch is pressed change attribute randomSound to random(1,6)
then have rules when randomSound=1
-play sound 1
When randomSound=2
-play sound 2
ect.
Cheers
the computer uses attributes to store the values of those characteristics
Attribute Types: tell the computer how many bits/bytes to allocate in RAM for the storage of that dataValue
Number Attribute Types:
Index: stores whole numbersValue; positive (unsigned); least RAM
Integer: stores whole numbersValue; positive or negative: medium RAM
Real: stores whole and/or fractional/decimal numbers: positive or negative; most RAM
any numberValue can be manipulated with the operants: +, -. /(divide), *(multiply)
any numberValue can interact with any other numberValue
the computer will round-off fractional/decimal values for index and integer types
EX:
index: Score when 0 = gameOver
Integer: a value to subtract from score -3
Real: anytime a number may have to store a fractional/decimal value: $12.89 … X = 54.5 … Color.Alpha = 0.25
===
Text type attributes can store numbers … but the number can not be manipulated as they are ascii
Angle type attributes can be manipulated but they are a handled differently by the computer within their specified numberValue range
Enumeration type attributes (this type you can not select when adding an attribute) also store a numberValue (whole positive)
@};- MH
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User