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)
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.
Under slider tools design tab for that slider, change the dropdown below the variable to when slider is released. then get your trigger order correct and it should work.
Welcome to the E-Learning heroes community! It looks like you're in good hands here but I did also want to link to the general tutorial on working with sliders here.
Hello community, thanks for the responses. Really appreciate it, and thanks for the welcome Ashley. Ill work on it based on the suggestions and let you know how it turns out.
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).
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 clickis notrecognized. So I just copied the trigger and made the Whenchange (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.
Can you describe more about what you mean by "when mouse is up" or "mouse is down"? It sounds like that element may need to be a feature request which you can send along here.
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}"
12 Replies
Hi Matthew thanks for the reply, I've tried that and It does not appear to be working for me. See screenshot. Unless I'm doing something wrong...
What I am trying to do is change the position of the slider, if the slider is on position 1.
I've also tried changing the trigger to "When the slider 1 moves"
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.
Under slider tools design tab for that slider, change the dropdown below the variable to when slider is released. then get your trigger order correct and it should work.
Hi Joseph,
Welcome to the E-Learning heroes community! It looks like you're in good hands here but I did also want to link to the general tutorial on working with sliders here.
Hello community, thanks for the responses. Really appreciate it, and thanks for the welcome Ashley. Ill work on it based on the suggestions and let you know how it turns out.
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
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.
Matther,
I had the same problem.
Hi Joseph,
Can you describe more about what you mean by "when mouse is up" or "mouse is down"? It sounds like that element may need to be a feature request which you can send along here.
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;
}
- - - - - - - - - - - - - - - - - - - - - - -
Thanks Joseph - that's definitely clearer to me now. If you didn't already submit this here, I can send it along on your behalf.
This discussion is closed. You can start a new discussion or contact Articulate Support.