Adjust the position of a slider via triggers and conditions?

Sep 22, 2015

Hello.

Is there a way to adjust a sliders position, not just the slider variable, using triggers? The scenario is, a question involving a slider and triggers that determine the correct position of the slider. However, I want the slider to skip over one position (eg. 0 - 5 slider, but 3 will be skipped or the slider cannot be placed there)

12 Replies
Walt Hamilton

The problem with what you are trying to do is that the variables change so quickly that your mouse is still controlling the slider when the trigger tries to change it. The user overrides the trigger.

Matthew is right, two triggers will not work either, again they complete before you can raise your mouse.

Perhaps (ala Matthew), another button to check the answer will do the trick.

Joseph Silipo

So I found a positive outcome!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Slider Update: When learner releases

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Trigger

Action: Adjust Variable

Variable: Slider 1 (to equal the value of) = 0

When: User Clicks

Object: Slider 1

On Condition: Slider 1 == 1.00

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Screenshot also provided.

So, based on the update, the mouse is released, updating the variable number and the mouse click trigger completes, adjusting the variable based on a correct code execution (trigger order).

Whoopie! Thanks everyone

Joseph Silipo

I found a bug.

To make it bullet proof, I copied the trigger and changed the (When) execution time to:

"When the user clicks outside of Slider 1"

I did this because if the user moves the mouse away from the slider then releases the mouse the click is not recognized. So I just copied the trigger and made the When change (using the 2 triggers per Slider now).

 

On a side note:

It would be great if you could join the "Whens", or alternatively have these available: "When mouse is up"  and "When mouse is down" without defining a specific referencing object.

Joseph Silipo

Hi Ashley,

Currently, you can only create a trigger that is "when user clicks (object)" or "when user clicks (outside of object)", but having trigger commands that look for specific mouse action (that are not assigned to an object), would be helpful. I've written a more clear explanation below:

"When the mouse is up" means that the mouse button has been pressed and released. This could be a trigger called "when mouse click is released"

"When the mouse is down" means that the mouse button is currently being pressed and is in the "down" position. This could be called "when mouse click is being pressed". Similar to the "Down" state that can apply objects.

This is an example of how it could have been implemented to solve my problem mentioned earlier:

- - - - - - - - - - - - - - - - - - - - - - -

"when the mouse click is released & slider1 is equal to 1 {make slider1 equal to 0}"

- - - - - - - - - - - - - - - - - - - - - - -

or

- - - - - - - - - - - - -  - - - - - - - - - -

if (slider == 1 && mouseIsUp ==  true)

{

      slider1 = 0;

 }

- - - - - - - - - - - - - - - - - - - - - - -

 

This discussion is closed. You can start a new discussion or contact Articulate Support.