Discrete Progress
SmartUI Discrete-Progress Behavior operation and ACEs.
Last updated
SmartUI Discrete-Progress Behavior operation and ACEs.
Last updated
Discrete Progress allows you to represent an integer value by distributing it among several parts of a Sprite plugin. This behavior is totally unusable on a different world object, since it relies on Sprite's animations to render properly.
Similarly to radio-buttons, it operates within the same context, whether it's the global container or lower-level containers created in the scene. Group all the Discrete Progress parts inside a container by adding them as children of the container. SmartUI will automatically determine the group they belong to.
Discrete-Progress uses the document flow together with the Part Sequence property to determine the order in which the parts will be filled.
All parts with the same part-sequence have the same priority for access by the framework. At this point, the document flow determines which part is processed first.
The Discrete Progress behavior iterates over an array of animations for the sprite to assign the active animation. Each part or sprite in the group can have a different number of subdivisions to represent the value. For instance, you can combine life hearts with pie or pizza slices to represent the value.
In this example, the number 9 is distributed among the different parts of the Discrete Progress group.
The hearts have 2 parts, and the pie has 6 parts. The value is distributed across all the available sprites.
A key attribute for this behavior is the animations, which require an ordered list of the animation names, separated by commas. Animation names are case-sensitive and must exactly match the names in your Sprite.
As you can imagine, the order to represent a value from 0 to 2 in above images is:
empty animation is for Zero
half animation is for 1.
full animation is for 2.
Smart UI Discrete Progress Part behavior handles progress parts UI components. If you use it as part of a hierarcy, you must add it to an object using a Smart UI Container behavior to be rendered correctly, since it will use its parent to determine the total Discrete Progress Part components available to alter.
Set Enabled
Disable/Enable the Component
Set Name
Sets the name of the component.
Set Part Sequence
Sets the parts sequence index for this component.
Set Max Parts
Sets the maximum parts for this component.
Set Group Value
Sets the value to be distributed among the parts of the same group. The group is determined by the container to which the parts belong.
Is Enabled
Returns true if the component is enabled
Compare Value
Compares the value of the part.
Compare Name
Returns true if the radio button components name equals the parameter
On Value Change
Triggered when the part value changes.
Value
Part current value.
MaxParts
Maximum parts for this component.
Name
Component name
(c) Pixel Perfect Studio 2024
Property
Description
Enabled
Enables or Disables the Discrete Progress Part. Value can still be set by calling the SetPartValue action from the SmartUI plugin.
Name
Unique name string for identifying the component
Part Sequence
Part sequence to be considered when setting the value of the Discrete Parts.
Max.Parts
Maximum parts to handle.
Animations
Sequence of animations separated by colon. Animations are set whenever the value changes. E.g.: animation1,animation2,animation3
Parameter
Description
Enabled
Enabled/Disabled
Parameter
Description
Name
Name of the component
Parameter
Description
Sequence
Index to priorize each part.
Parameter
Description
Value
Maximum parts number for this component.
Parameter
Description
Value
Value to be distributed.
Parameter
Description
Comparison
How to compare the variable
Value
Value to compare the variable
Parameter
Description
Name
Name to compare with the component picked.