• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

TEB's not incrementing variable

Explorer ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

captivate 19 11.5.1.499

 

I have 3 TEBs on one slide, each with user validation, and show button deselected. On success I say increment a variable by 1 (with continue playing the project deselected and shortcut to none).

 

I have a custom submit button with an action saying if all are true, show correct text and next button, else hide (these elements Which are hidden on stage)

TEBVar.png

My problem is that the TEBs don't seem to be retaining any information, or maybe the success is not incrementing the variable assigned to each TEB (i made 3 unique). I did it this way to avoid an action on enter of slide which increments the variables with the correct entry in the TEBs. Is my strategy wrong?

TOPICS
Advanced actions

Views

251

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

FYI there is a new update. Most recent version for windows is 11.5.5.553.

 

This is very confusing... What are those variables? Probably not the associated variable of the TEBs. Why are you not using those variables? They have as value the Entry in the TEB. Maybe I misunderstand, but you could clarify. If you incremented a counter with each correct answer, could understand. But you are using 3 variables...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Yes I have 3  unique variables with a value of zero, so in the TEB properties I'm saying - on success increment by 1 - and then the submit button runs the script in the screenshot above.  the screen below shows the increment I've placed in each TEB and it's associated variable:
TEBincrement.PNG

perhaps I'm misunderstanding "success" for each TEB, each one has user validation with the correct answer provided, so I thought if they put in the correct answer, success would increment, and then the submit script would react off those new values (being 1 for each). 
thanks,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

If you insist on this over-complicated workflow, use at least the Assign command instead of the Increment command. 

Normally with one Submit button I would have used the If with checking the content of the TEB variable for each TEB to the correct value. You are using 6 variables instead of 3.

IF v_TEB1 is equal to ... correct answer 1 AND

     v_TEB2 is equal to ... correct answer 2 AND

     v_TEB3 is equal to... correct answer 3

Show Grp...

 

No need for ELSE since the objects in the group (please group instead of two commands) is hidden.

 

Or alternative would have been to add one user variable, v_counter, which you increment with each Success action. The IF would then check if v_counter is equal to 3. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

thanks for your help, I did it your way and it worked -  after I correctly built the autosubmit features of each text entry box.  So then I went back to my original project (at the top of this thread) and did the same so that auto submit was correct, and it worked too.
TEBAutoSubmit.PNG
I'm going to stick with the way I did it originally because I don't want to group hidden items as you suggested. I also don't feel i need the AND argument if my conditional is "if all conditions are true"

Thanks and have a good day.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 2020

Copy link to clipboard

Copied

LATEST

You are really new to advanced actions. I typed out the script, the AND is not an argument but appears automatically if you have All conditions are ture selected.

As for not grouping, up  to you if you like entering more commands in actions. I have written so many advanced and shared actions that I eagerly take all possibilities to simplify. Especially in shared actions why this can mean less parameters and more flexibility.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources