Skip to main content

Part 3: Configure Behaviors

The following interactions can be configured using Behaviors.


Music Time

In the Scene Tree panel select the Slider control, which can be found in the Music Group. Now, drag and drop a Forward Value Behavior from the ToolBox into the right side of the Scene Tree panel, while the Slider control is selected.

drawing-5-1729844850.png

Select the Forward Value behavior of the Slider in the right side of the Scene Tree panel and configure its TargetNode in the Properties panel. To do this, click the magnifying glass icon next to the TargetNode property, which will open the Choose Item dialog where you can select .../Music/DigitalClock_Time.

drawing-5-1729854578.png

Seat heater setting

This section will add some functionality for Seat Heating to the scene. This will affect the IconButtons for increasing and decreasing the Seat Heating Temperature (Icon_Button_- and Icon_Button_+ in both Seat_Right and Seat_Left).

Drag and drop the following behaviors onto all 4 IconButtons:

  • Event Handler
  • Check Click
  • Send Value As Event
drawing-5-1729850466.png

Then, set the respective Properties of Send Value as Event. The Value should be decreased (-1.00) when pressing "-" and increased (+1.00) when pressing "+". ChangeValue should be set to Relative all four cases. Configure the ProgressBar of the group in which the respective IconButton is placed. (e.g., an Icon_Button in Seat_Right would set the ProgressBar of Seat_Right.) as TargetNode.

drawing-5-1729852688.png

Next, we will add a Forward Value behavior to the ProgressBars of Seat_Right and Seat_Left. Drag and Drop a ForwardValue behavior from the ToolBox onto the ProgressBar. Select the Forward Value Behavior to view the behavior's Properties in the Properties panel. Configure the TargetNode to the TextValue_Temperature of the respective group. (If it is a ProgressBar of Seat_Right, set the TextValue_Temperature of Seat_Right.)

drawing-5-1729853505.png

Run in Player

Save your solution and click the Play button in the menu bar to run CGI Player.

drawing-5-1729854630.png
  • In the Music section: Click onto the progress bar below the Song title or drag it around. You can see that the progress time is changed according to your operation.
  • In the Comfort section: Press either +/- buttons in Seat heater section and watch the value and progress bar being updated according to your operation.
drawing-5-1695991627.png