

Question on Advanced actions, decision blocks, and two sequential if.
I am trying to create a shared action that I can use to: (1) skip the slide if the slide has been visited, (2) mark the slide as visited, (3) if a condition is true then change the state of an object to state 1 and increment a variable by one but if it is false then change the object to state 2 and not increment the variable.
If the slide has been visited, I want to skip it and not do anything else.
If the slide has not been visited, I want to mark it as visited, and then check a condition, depending on that condition it would do (i) change object to state one and increment a variable by one or (ii) change the object to state two and not increment the variable.
Why?
I asked the user a question, if they got it right I want to tell them that and add one to their score. If they got it wrong I also want to tell them and not add anything to their score. Either way, once I have asked the question and given the feedback, I do not want the user to be able to go back to the question or feedback slide. And I am using the skin viewer navigation. Therefore, I cannot eliminate the back button in those two slides (which would make it much easier).
In a normal programing language I could write:
10 If visited=1 then next_slide (and exit this program);
20 let visited = 1;
30 if answer=correct then xxxx else yyyy;
I cannot figure out how to do this with advanced actions and decision blocks.
Could someone help me on this?
Thanks.
I am trying to create a shared action that I can use to: (1) skip the slide if the slide has been visited, (2) mark the slide as visited, (3) if a condition is true then change the state of an object to state 1 and increment a variable by one but if it is false then change the object to state 2 and not increment the variable.
If the slide has been visited, I want to skip it and not do anything else.
If the slide has not been visited, I want to mark it as visited, and then check a condition, depending on that condition it would do (i) change object to state one and increment a variable by one or (ii) change the object to state two and not increment the variable.
Why?
I asked the user a question, if they got it right I want to tell them that and add one to their score. If they got it wrong I also want to tell them and not add anything to their score. Either way, once I have asked the question and given the feedback, I do not want the user to be able to go back to the question or feedback slide. And I am using the skin viewer navigation. Therefore, I cannot eliminate the back button in those two slides (which would make it much easier).
In a normal programing language I could write:
10 If visited=1 then next_slide (and exit this program);
20 let visited = 1;
30 if answer=correct then xxxx else yyyy;
I cannot figure out how to do this with advanced actions and decision blocks.
Could someone help me on this?
Thanks.
You must be logged in to post a comment.

- Most Recent
- Most Relevant
Please start a new discussion because your problem may seem to be the same but it would be easier to answer your question if you could clarify more and show some screenshots. Here are some questions to start with:
- Which exact version are you using as mentioned under Help, About Captivate?
- The easiest way to do what you want is to create a Visited state for the menu button. In that State you can add the checkmark. Advantage: once the button is clicked it will go to that Visited state automatically without needing any supplementary action.
- Since you leave the menu slide, and revisit it later, you need to activate the option ‘Retain State on slide revisit’ in the Properties panel of the button.
Due to your request for an IF action, I suspect that you are using a Show/Hide workflow at this moment. If you insist on using that workflow, I need to know which events you are using to make the check mark visible. You can do that from any slide in the project provided you are doing it with an advanced or shared action. If you want to do it with the OnEnter event of the menu slide, you would need a user variable for each button, which makes it a lot more complicated.
Going two slides further is easy. Use this command:
Expression cpCmndGotoSlide = cpInfoCurrentSlide + 1
Why 1 and not 2? Because cpCmndGotoSlide has an index starting at 0 whereas cpInfoCurrentSlide starts at 1
You question slide is not the default T/F but a custom one? Not sure why…. If you had used a default T/F quiz slide you wouldn’t need to skip the question slide on second visit, because within the same Quiz attempt it would be frozen after the first visit.
The variable tfanswer has the same value as cpQuizInfoAnswerChoice? It is not a Boolean, which would make it a lot easier.
Honestly I believe you are making this all much more complicated than necessary, especially within the limited environment of a Fluid Boxes project. Why do you not use a default T/F question and its feedback messages?
About the Shared actions, and the choice of literals/variables for the candidate parameters, I have been writing several blogs and published videos. You need to be VERY careful with defining literals as parameters. You cannot expect me to give a full course about shared actions here. In the conference I got now a 2 hours workshop, for both advanced and shared actions. Content will be rather limited in such a short time, too bad.
In both questions you asked very important information was missing. You didn’t tell this was a fluid boxes project, which means immediately that there are a bunch of limitations.