Next: , Previous: , Up: Interaction.Output   [Contents][Index]


9.2.7 MessageScalar

Component: MessageScalar

Message Scalar lets you change the scale of an object by sending messages. To use, add this to the object you want to resize during gameplay. Next, send messages to the Message Scalar to tell it how to resize the object. You can resize it instantaneously, by using ’SetScale’, or you can use ’Grow’ to make it scale over time. Growth can happen in both directions!

Message on MessageScalar: ChangeScale (float)

Allows you to set the new scale directly

Argument: The new uniform scale for this object

Message on MessageScalar: OffsetScale (float)

Allows you to adjust the scale based on it’s current value

Argument: The amount of change we would like to add to the object’s uniform scale

Message on MessageScalar: RandomizeScale (float)

Allows you to randomize the size of an object based on it’s starting scale. This adds a random number based on the magnitude you supplied.

Argument: How much can we randomize it? We will select a random number between this value and the inverse of this value and add that to the scale.

Message on MessageScalar: Grow (float)

Allows you to grow or shrink the object to a new scale over Grow Shrink Time, defined above

Argument: How large or small should the object be when it’s done changing size?

Message on MessageScalar: SetGrowthTime (float)

Allows you to change the Grow Shrink Time (as defined above) during runtime by passing a new value.

Argument: The new amount of time you would like growth and shrinking to take.

Message on MessageScalar: ChangeScale (float)

Allows you to set the new scale directly

Argument: The new uniform scale for this object

Message on MessageScalar: OffsetScale (float)

Allows you to adjust the scale based on it’s current value

Argument: The amount of change we would like to add to the object’s uniform scale

Message on MessageScalar: RandomizeScale (float)

Allows you to randomize the size of an object based on it’s starting scale. This adds a random number based on the magnitude you supplied.

Argument: How much can we randomize it? We will select a random number between this value and the inverse of this value and add that to the scale.

Message on MessageScalar: Grow (float)

Allows you to grow or shrink the object to a new scale over Grow Shrink Time, defined above

Argument: How large or small should the object be when it’s done changing size?

Message on MessageScalar: SetGrowthTime (float)

Allows you to change the Grow Shrink Time (as defined above) during runtime by passing a new value.

Argument: The new amount of time you would like growth and shrinking to take.


Next: , Previous: , Up: Interaction.Output   [Contents][Index]