Forum rules - please read before posting.

Slider -ActionList on change-

Hi, I have a slider and I want to execute an action list when the variable associated to the slider reaches a value. The action is more or less "if the variable is less than 50 then run an animation" I call the action list from the ActionList on change box, but it's not working.
I assume that the action list is called every time the slider increases or decreases, is that correct?

This is my configuration.
https://pasteboard.co/zrSheGgCbYrK.jpg

Comments

  • That's correct - what does your "FrameEventHealthPostProcess" ActionList look like?

    Generally, this should be a simple background ActionList that simply checks the value. If you want it to then run something more substantial (e.g. a line from the Player), you can then follow it up with an ActionList: Run Action to run a separate ActionList (that can optionally block gameplay) if the condition is met.

  • Thanks Chris
    FrameEventHealthPostProcess is only a -comment as info- for testing.

    By the way, mi software is
    Unity 2021.3.4f1
    AC 1.75.3

  • This is weird, if I turn on the option -User can change value?- and I change the slider by clicking on it, it works and the comment is displayed.

    But if I change the slider by changing the associated variable, the action list is not executed (although the slider graphic changes properly)

  • Thanks for the details.

    By design - the ActionList will run as the result of the Slider being maniuplated directly.

    How are you updating the variable? If this is using the Variable: Set Action, it sounds like it may be best to run your "FrameEventHealthPostProcess" ActionList afterwards.

    Otherwise, a custom script that listens to changes in variable values would be viable as well - the OnVariableChange custom event will fire at this time.

  • Ok I understand.

    Im going to chnage the variable by Variable: Set Action in a lot of places here and there and then check the value of the variable to perform some visual changes if necessary. ActionList on change was a helpful shortcut.

    I will check the custom event approach.

    Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.