is it possible to create everytime a value for clicking on the same button

mmilo9281
mmilo9281 Community Member Posts: 155 ☆ Roadie ☆
for example:  if the user is clicking 3 times on the same button he comes to the next page.

Is such scenario possible?

Greetings Marcel

Comments

  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    It should not be too difficult. Create a variable, e.g. "counter", initial value = 0

    Add an action to the Next button above the "Go to: Next page" action:

    On: Click
    Action: Modify variable
    Target: counter
    Type: Add to variable
    Value: 1

    Add a condition to the "Go to: Next page" action:

    Only if "counter" equal to 3

    Not sure what you want to achieve. You might add another action to the button:

    On: Click
    Action: Modify variable
    Target: counter
    Type: Set equal to
    Value: 0
    Delay: 1 sec

    This way the user would have to click fast to reach the next page or start again. Or you probably need another approach to reset the variable, e.g. when the page is shown.
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Yes, Marcel. If you establish a variable to track the number of times a button is clicked you can use a conditional action to go to the next page when the variable equals 3. You can copy and paste the button onto other pages; just make sure you reset the variable to zero on page show.
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Sorry, Tim. Didn't see your response.
  • brobertson4402
    brobertson4402 Community Member Posts: 24
    Suggested change to Tim's reply. Change the condition from '3' to '2' if you want to monitor for 3 clicks.  The variable is at '2' when one clicks the button the third time.  Otherwise, the action won't trigger until the fourth click.

    Add a condition to the “Go to: Next page” action:

    Only if “counter” equal to 2
  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    If I start at 0 and add 1 on each click, how can it be 2 after the third?
  • cainam
    cainam Community Member Posts: 365 ♦ Idol ♦
    Depends on when the 'change variable' action fires?   ...before the 'go to next page' action in priority, or after (or if the delay of 1 second is added to the change variable action)... I guess you are both right?  lol
    - Adam Cain
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    You don't need a delay.
  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    Alright, if you do the go to action first and the add to variable action after that, the condition needs to check for 2. The reset to 0 action with a delay, is only required if you wanted the user to do a triple-click, i.e. click 3 times within 1 second.
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Ahh, a triple-click. Gotcha. I thought he was just looking for three normal hits on the button.
  • mmilo9281
    mmilo9281 Community Member Posts: 155 ☆ Roadie ☆
    hey Darrel, i tried your button title, it works fine :-)

    can i also use this in a quiz as "submit button". The user has 3 attempts and after the third wrong attempt, he jumps to next site. i cant use the normal attempt settings, because i put a Qreset action to the submit button in the quiz and this action also reset the counter of attempts.

    thx for your time guys
  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    It can be done, although the users may not like being pushed on to the next page without any comment about the incorrect answer. It may be nicer to show feedback and let them advance themselves.

    But still:
  • mmilo9281
    mmilo9281 Community Member Posts: 155 ☆ Roadie ☆
    Hi Tim, thx, that works perfect, and you are right with the feedback, i will build one.

    THX
  • mmilo9281
    mmilo9281 Community Member Posts: 155 ☆ Roadie ☆
    Hi Tim, i have build Feedback for the quiz. What do you mean, does this works? :-)

    greetings marcel
  • timk
    timk Community Member Posts: 1,244 ✭ Legend ✭
    It seems to work, doesn't it? Of course feedback is not required. It's just my opinion that it's better to know whether or not my 3rd answer was correct.

     
  • mmilo9281
    mmilo9281 Community Member Posts: 155 ☆ Roadie ☆
    Hi Tim, i think it works, but i will test it with some pupils next week :-)

    Thx, Marcel