Copy link to clipboard
Copied
Hi,
I’m creating a matchstick puzzle where you click to remove matches (images of matches).
The order is not important.
When user clicks matchstick image – the image is hidden and an outline of the image is displayed.
If user clicks the outline the matchstick image is displayed.
I have a counter “Matches removed” that displays the number of matchstick images that have been removed.
And a variable “Matchstick_visible” that indicates if the matchstick image is visible or not.
There is a “Submit” button onscreen to validate the puzzle.
Everything works fine but now I want to only allow user to remove a certain number of matches e.g. 4.
When the user tries to remove a 5th match a message will pop up telling them they have to replace a match before they can remove another match.
I don’t know how to add this functionality to the AA below.
Captivate 8.0.1.242, Non-Responsive, No scoring, No LMS, Windows.
AA for each match:
Decision 1 - Visible:
IF “Matchstick_visible” = 1
Hide matchstick image
Show matchstick outline image
Increment “matches removed” counter by 1
Decision 2 - Invisible:
IF Matchstick_visible = 0
Show matchstick image
Hide matchstick outline image
Decrement “matches removed” counter by 1
Decision 3 - Toggle:
IF 1 = 1
Toggle Matchstick_visible
Regards
Donal.
1 Correct answer
I allow to manually reset a matchstick one by one, or to reset everything. And if the user cheats and removes a 7th matchstick, everything will be reset automatically.
Creating such a game is not that hard (for me), but having to write out all the explanations takes a lot more time.
It is published, you can have a look at: Matchstick Game - shared actions - Captivate blog
Copy link to clipboard
Copied
Hello,
Would like to help, but I don't know that game. Could you post some screenshots to explain?
As far as I understand it now, I would combine the first two decisions in one decision, since they are just the opposite of each other. Moreover I suspect that the toggle command which you put at this moment in a separate mimicked standard action (your third decision) can be included in that first decision. The second decision could then check the value of 'matches_removed' variable and show the message. But I don't know what has to happen more when already 4 matches have been removed?
Moreover I would recommend using shared actions, since you use this action over and over again. Which event do you use to trigger the action: click box over both images, or shape buttons with the images?
Copy link to clipboard
Copied
Hi Lieve,
Here is the matchstick puzzle i am trying to do - remove 6 matchsticks to make 10.
I had not thought of showing the message when they removed the 6th matchstick (as per example in image above). That is possible.
But i think a more complete solution would be to show the message when they click the 7th match, because this allows them to replace the 6th match
without getting the message.
FYI: Nothing happens when 6 matches are removed but I want an error message displayed when the user clicks a 7th match.
I could include a new decision at the start
IF “matches removed” = 6
Show message
Show click box (to remove msesage)
I'm just not sure how you deal with the visibility, match count, and toggle?
i.e. don't allow removing a 7th match but do allow the replacing of the 6th match.
I am using a click box over the two images.
I plan to use shared actions once i get my scaled down model working (i.e. just using 3 matches instead of 15 at the moment)
Regards
Donal.
Copy link to clipboard
Copied
Approach with shared actions is different, would start right away with them. If you first try it out with advanced actions, the setup will not necessarily be the most usable.
It would take some time to work this out, thinking about not using one click box over two images but using two shape buttons, one with the match and one with the outline. It could prove more efficient when using shared actions. Especially if you want to use this for other situations with another number of matches, total as well as to allow removal. Another approach could be using two identical slides, switching back and forth between them.
Copy link to clipboard
Copied
Hi Lieve
I think i worked it out - AA for each match below (for remove 6 matchsticks to make 10).
I added an "AttemptsExceeded" variable.
Re: Shared actions - Can you explain why two shape buttons are better than using one click over two images?
Regards
Donal.
Decision 1: Message
IF “v_Matchstick_visible” = 1 AND “v_matches removed” = 6
Show Message
Show click box (that will remove message)
Assign "v_AttemptsExceeded" = 1.
Decision 2: Visible
IF “v_Matchstick_visible” = 1 AND "v_AttemptsExceeded" = 0
Hide matchstick image
Show matchstick outline image
Increment “v_matches removed” counter by 1
Decision 3 - Invisible:
IF "v_Matchstick_visible" = 0
Show matchstick image
Hide matchstick outline image
Decrement “v_matches removed” counter by 1
Decision 4 - Toggle1:
IF "v_Matchstick_visible = 0" OR "v_Matchstick_visible = 1" AND "v_AttemptsExceeded" = 0
Toggle "v_Matchstick_visible"
Decision 5 - Toggle2:
IF "v_Matchstick_visible = 0" AND "v_AttemptsExceeded" = 1
Toggle "v_Matchstick_visible"
Copy link to clipboard
Copied
I have a working and tested solution, with only 3 decisions in one shared action. I think you make it too complicated, why do you never use the ELSE part of a condition? Moreover you need to have a variable for each matchstick or you end up with conflicts. If you toggle your v_Matchstick_visible with one matchstick, it will remain toggled for the next one, how will you solve that?
In my solution:
- First decision will switch between image and outline, toggle the visibility var for that matchstick, increment or decrement a counter
- Second decision will check if counter reaches 6, in that case will show the Warning message, if not will hide that message
- Third decision will check if the correct matches are removed, if yes will hide the Warning message and show the Success message
A reset button is added, so that user can play again.
And I have a Success text appearing when the correct matches are removed.
Will probably post this solution on my blog, you'll be able to check it out. I tested with all matches.
Be careful with combinations AND + OR! They can often give weird results.
Oops, forgot to answer your question. I created the solution with the click box. I mentioned using two shape buttons, because they would simplify your actions, have a feeling that you don't grab totally the concept of conditional actions with multiple decisions. Sorry, I don't want to insult you, it is just the result of looking at what you showed about your projected actions. That splitting up has nothing to do with using shared or advanced actions, just about simplifying.
Copy link to clipboard
Copied
Hi Lieve, Yes i had planned to use a seperate variable for each match, just wanted help with the AA logic. My AA is complicated because i wanted the user to be able to replace a match even when six matches are removed, and not just display a message after 6 matches were removed. I look forward to reading your solution and learning from it. Re: your last comment - I don't have much AA experience and am totally new to shared actions. Thanks Donal.
Copy link to clipboard
Copied
I allow to manually reset a matchstick one by one, or to reset everything. And if the user cheats and removes a 7th matchstick, everything will be reset automatically.
Creating such a game is not that hard (for me), but having to write out all the explanations takes a lot more time.
It is published, you can have a look at: Matchstick Game - shared actions - Captivate blog
Copy link to clipboard
Copied
Hi Lieve
I'm only getting around to having a look at your solution now.
Yes - mine was far too complicated and yours was nice and simple.
It's nice to see how you approached it after trying it myself.
I learnt alot - e.g. showing warning message and allowing a pencil to be removed at the same time, creating two AAs (using "Else" parts as well), using a group for messages etc.
Thanks.
I'm trying to implement your solution and i have a problem.
I renamed two images - a pencil image and the outline image.
But the orginial names appear along with the new names when i go to save the AA as a shared action.
So i cannot create the Shared Action.
I've checked the timeline, aa, updated the aa, previewed the aa, and created a Show action to see if i could see the objects.
The orginal objects/names were not there.
Have you come across this before? Any solution? or will i just recreate the AA.
Regards
Donal.
Copy link to clipboard
Copied
Not sure what happens but I fear a conflict between names being used twice. Captivate is very sensitive to that, on the whole I always recommend to never reuse a name at all and to develop a labeling system that will avoid duplicate names. I really plan to write a cookbook for actions (and busy writing about labeling at this moment), your game will be part of it, one of the recipes. KISS is a favorite motto of mine, but I had to create several versions of the actions to get to the final result. Making it simple is often not that simple. And I had also in mind that the shared actions could be tweaked again to make them suitable for similar match games.
Copy link to clipboard
Copied
Hi Lieve,
Maybe it was a conflict. I had the numbering sequentially i_pencil01 to i_pencil15.
Then i changed it to block numbering for each letter of "TEN" - 10, 20, 30.
So i changed i_pencil01 to i_pencil10 in the first block.
Match games:
That was going to be my next question after i had worked through this example. i.e.
1. a move matchstick game
2. a move matchstick game that included some at angles.
Other receipes:
If you're looking for other receipes you could include a grid "recycling" question.
Put the rubbish in the correct container.
Yellow Blue Green Black
Paper
Glass
etc
Where only 1 container is allowed per row.
To show smart shapes in action you could use smart shapes as button with variable set to blank initially and an "X" when clicked.
When one shape in the row is clicked the others in the row become blank.
Use shared actions for each row.
A Submit button would show visual indicators (X, tick) and a score.
Maybe it too "a la carte" for your cookbook : )
And I'm sure you'll come back with a simplier way : ) : )
D.
Copy link to clipboard
Copied
That rubbish thing can better be done with Drag&Drop, there must be some example somewhere.
I was first thinking about setting up same matchstick game but with other configurations.
Drag&Drop has several possibilities if playing with object actions: Drag&Drop tips - Captivate blog

