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

increment count and execute and action

New Here ,
Nov 18, 2015 Nov 18, 2015

I need a button to increment a count and then run a conditional. Is there any way to do this?

2.5K
Translate
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

correct answers 1 Correct answer

Community Expert , Nov 18, 2015 Nov 18, 2015

You need to use Conditional Advanced Actions in this case.  You can have an initial decision block that increments the counter variable followed by another decision block that checks the values of all other variables involved and then decides whether or not to show the Next button.

Conditional Actions and Decision Blocks are all explained in pages you can reach from that link I gave you above.  It's also in the e-book with example CPTX files.

Translate
Community Expert ,
Nov 18, 2015 Nov 18, 2015

Yes.  Create a user variable to hold the counter number.  Use a button to execute an Increment action each time it is clicked.  If you don't have Captivate 9 where you can disable continue on the button click, use a Standard Action to Increment.

If you don't understand any of this, start reading here:

Master the Art of Captivate's Advanced Actions | Infosemantics Pty Ltd

Translate
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 18, 2015 Nov 18, 2015

What is the exact goal? You have to explain better. On my blog there are quite a lot of examples where a counter is used and based on its value a condition is triggered.

Translate
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
New Here ,
Nov 18, 2015 Nov 18, 2015

I am creating a drag and drop game that once all items have been placed will allow the user to continue. I have the drag and drop game part working. Trying to get the next button to display after each item has been placed. I have been trying to have each item increment their variable from 0 to 1 and then check their status. Problem with this method is I need it to increment before checking the status of all variables. If there is a better way I am all ears. Thanks in advance.

Translate
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 18, 2015 Nov 18, 2015

You need to use Conditional Advanced Actions in this case.  You can have an initial decision block that increments the counter variable followed by another decision block that checks the values of all other variables involved and then decides whether or not to show the Next button.

Conditional Actions and Decision Blocks are all explained in pages you can reach from that link I gave you above.  It's also in the e-book with example CPTX files.

Translate
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 19, 2015 Nov 19, 2015
LATEST

In that case you need to use the object actions of the Drag&Drop, you should have mentioned in the original question that it was a D&D setup. Have a look at:

Drag&Drop tips - Captivate blog

I forgot to ask which version you are using? The article was written for an older version, which means that to avoid releasing the playhead when triggering an object action, that action had to be a shared or an advanced action, not a simple action. In Captivate 9 you can use a simple action because there is a feature that allows you to uncheck 'Continue Playing project' with simple actions, also for D&D object actions.

Translate
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