Skip to main content
Known Participant
January 12, 2023
Answered

advanced action with variables to identify state of objects -> 2 correct solutions

  • January 12, 2023
  • 1 reply
  • 2374 views

I already had help with creating a little test with objects of different states, that can be identified with variables (https://community.adobe.com/t5/captivate-discussions/bedingte-erweiterte-aktionen-mit-mehr-als-2-status/m-p/12031783#M291239), I hope the next step can also be done:

 

Imagine an equation like:
[A] = [B] x [C]

 

A, B, C are objects with 3 different states (each of them: state 1 = A, state 2 = B, state 3 = C). By clicking on the objects, the states change. By clicking on "Send", the object's states shall be checked ("right" oder "wrong") - for all 3 objects at the same time.

 

I have tried without success to create an advanced action that allows to have either B oder C in object 2+3. The equation is correct in both forms:
A = B x C as well as A = C x B

 

I am curious to learn how this can be fixed. Thanks for your ideas!

    This topic has been closed for replies.
    Correct answer Lilybiri

    To calculate in Captivate you need to use the Expression command. It has the four main mathematical operators.

    Some examples:

    Besides +, you have - * and /

    I added the last line to show that calculation can be powerful: that command will skip 60 frames (2 seconds if the default 30FPS is kept) on the timeline. Check out the end of this thread, where I took advantage of that type of workflows:

    https://community.adobe.com/t5/captivate-discussions/how-to-resume-audio-from-where-it-last-stopped/td-p/13478947

     

    You are showing only the logical operators for a condition. Bit amazed that you always ask for JS whereas you didn't yet explore the possibilities of the point-and-click actions in Captivate.

    1 reply

    Stagprime2687219
    Legend
    January 13, 2023

    If you are using the same setup as in the previous post that you mentioned, and you want the learner to click through the cards until the value equals 6, you should be able to perform a check for

     

    myVar * myVar2 == 6

    Or you need to introduce a third variable (myVar3) for the answer card and have the same setup as the other two with the incrementing variable matching the states.

    Then you would check for

    myVar * myVar2 == myVar3

    Known Participant
    January 14, 2023

    Hi and thank you very much again for your help!

     

    How can I calculate with variables? Within the advanced actions, I only have these options (see screenshot):

    =

    >

    <

    includes

     

    Maybe my Version 2019 (11.5.5.553) is not capable to do this?

    Lilybiri
    LilybiriCorrect answer
    Legend
    January 14, 2023

    To calculate in Captivate you need to use the Expression command. It has the four main mathematical operators.

    Some examples:

    Besides +, you have - * and /

    I added the last line to show that calculation can be powerful: that command will skip 60 frames (2 seconds if the default 30FPS is kept) on the timeline. Check out the end of this thread, where I took advantage of that type of workflows:

    https://community.adobe.com/t5/captivate-discussions/how-to-resume-audio-from-where-it-last-stopped/td-p/13478947

     

    You are showing only the logical operators for a condition. Bit amazed that you always ask for JS whereas you didn't yet explore the possibilities of the point-and-click actions in Captivate.