Smart UI for Construct 3
Pixel Perfect Studio
  • Smart UI for Construct 3
  • Getting Started
    • Smart UI Framework
      • Framework Initialization
      • Document Flow
      • Using Smart UI Components
      • Release Notes
        • Build v1.4ed2c828
        • Build v1.3710335f
        • Build v1.595dac53
        • Build v1.143edbbc
      • Basic Setup Tutorials
      • GitHub Repository
      • Dev Discord Server
      • Gamepad Demo
      • Guandows Demo
  • FRAMEWORK ADDONS
    • Smart UI Plugin
    • Container Behavior
    • Button Behavior
    • Checkbox Behavior
    • Radio Buttons
    • Progress Bar
    • Discrete Progress
    • Scroll Bar
    • Dialogs
    • Scroll View
      • Basic Examples
    • Grid Layout
      • Basic Examples
    • Data Listener
  • MISCELLANEOUS ADDONS
    • Legends of Learning Plugin
      • Getting Started
      • Local Testing
      • Using the Test Harness
    • Newgrounds.IO Plugin
      • Getting Started
      • Login Tutorial
    • Parabolic Tween
      • Getting Started
      • Live Demo 1
      • Live Demo 2
    • Finite State Machine Plugin and Behavior
    • Antisuspend Plugin
      • Live Demo
    • Google Analytics 4
      • Getting Started
Powered by GitBook
On this page
  • Properties
  • Basic Setup - Tutorial Video
  • Smart UI Discrete Progress
  • Actions
  • Set Enabled
  • Set Group Value
  • Set Max Parts
  • Set Name
  • Set Part Sequence
  • Conditions
  • Compare Value
  • Compare Name
  • Is Enabled
  • On Value Change
  • Expressions
  • Name
  • MaxParts
  • Value

Was this helpful?

  1. FRAMEWORK ADDONS

Discrete Progress

SmartUI Discrete-Progress Behavior operation and ACEs.

PreviousProgress BarNextScroll Bar

Last updated 3 months ago

Was this helpful?

Discrete Progress allows you to represent an integer value by distributing it among several parts of a plugin. This behavior is totally unusable on a different world object, since it relies on Sprite's animations to render properly.

Similarly to , 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 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:

  1. empty animation is for Zero

  2. half animation is for 1.

  3. full animation is for 2.

Download

Properties

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

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.

Actions


Set Enabled

Disable/Enable the Component

Parameter

Description

Enabled

Enabled/Disabled

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.

Parameter

Description

Value

Value to be distributed.

Set Max Parts

Sets the maximum parts for this component.

Parameter

Description

Value

Maximum parts number for this component.

Set Name

Sets the name of the component.

Parameter

Description

Name

Name of the component

Set Part Sequence

Sets the parts sequence index for this component.

Parameter

Description

Sequence

Index to priorize each part.

Conditions


Compare Value

Compares the value of the part.

Parameter

Description

Comparison

How to compare the variable

Value

Value to compare the variable

Compare Name

Returns true if the radio button components name equals the parameter

Parameter

Description

Name

Name to compare with the component picked.

Is Enabled

Returns true if the component is enabled

On Value Change

Triggered when the part value changes.

Expressions


Name

Component name

MaxParts

Maximum parts for this component.

Value

Part current value.

(c) Pixel Perfect Studio 2024

Basic Setup - Tutorial Video

Smart UI Discrete Progress

📺
https://store.pixelperfectstudio.mx/product/smart-ui-ncbeta/
Sprite
radio-buttons
document flow
Number 9 represented with Discrete-Part instances.
3 animations are available for the hearth.