Forum Discussion
Layer keeps showing - only want it visible once
Hello!
I'm brand new to this all, and I am designing a matching game within a big course, and the game is 99% done. I just have one snag:
When a match is correct, I made a trigger to show a layer with an explanation. (Show layer Match 1 Correct when timeline ends on this layer if match1=true).
I did this for all 6 matches, and it works if people get the matches correct and nothing else.
However, if people have guessed a correct match and then guess an incorrect after (ex. Match 1 is correct, then they click 2 random, non-matching cards) the Match 1 correct layer still pops up.
What trigger can I add to make sure the explanation layers only appear once, when the actual match is picked? I've been messing around with /when cards are disabled, hide layer/ but that does nothing.
Ideas? Thank you!!
- WaltHamiltonSuper Hero
Add two triggers to Match 1 Correct layer:
Set variable LayerMatch1CorrectShown to true when timeline ends on layer Match 1 Correct (this layer)
Hide layer Match 1 Correct (this layer) when timeline starts on this layer if LayerMatch1CorrectShown is true
- WaltHamiltonSuper Hero
When an action occurs, it runs through all the triggers that are attached to that action. Thus, when the timeline ends on Check Match layer, all the "when timeline ends..." triggers ate executed, even the ones that are not related to the current action. That's why Match 1 correct shows up every time the timeline ends. To prevent that, you need to put something in the trigger to prevent it from showing more than once.This trigger will not show it if the variable has not changed to True:
Then you need a method to change the variable to true when the layer Match 1 Correct is shown. This one will do that:
By the way, I notice that the Check Match layer has only one trigger to show a correct match (Match 1). I imagine you will add the others when it is working well. The attachment has only slide 2.10, so you can import it into your project.
- BeckyLiu-KatzCommunity Member
Thank you so much!! I'll give it a go! I really appreciate your help.
- BeckyLiu-KatzCommunity Member
Hello!
Thank you so much for your help! It really helped me sort this all out.
I've now come back with ANOTHER issue. This game just won't let me do what I want.
I have a layer of balloons that animate across the screen when all matches are made.
Originally I had a trigger to show that balloon layer shows when matches=6. It worked, except, the final Match Correct layer (whichever match was clicked last) wouldn't appear - as soon as the 2 cards were clicked and the variable Matches changed to 6/6, the balloons appeared.
I am trying to create triggers so that the balloons only appear AFTER all the Match Correct layers have shown so the user can get all the information.
I created a variable called visited, which is true when all the Layer1-6MatchCorrectShown=true.
But now the balloons don't show at all. I need help sorting out the triggers. I know I'm forgetting something, but can't quite work out how to make the balloons appear after ensuring all the Match Correct layers have been shown.
Thank you for all your help!
I am adding an updated file (Slide 2.11) - I tried to export a single slide but it wouldn't give me a .story file - just the individual pieces of the file.
- RonPricePartner
Without seeing how you created the interaction it would be difficult to help. Is this a slide you can share?
- JudyNolletSuper Hero
Based on your description, it sounds like the trigger is on a layer that re-runs. After the associated T/F variable = True, every time that layer's timeline ends, the Match 1 Correct layer will show.
So you either need to change the "when" for the trigger. For example, show the layer based on the same "when" that changes the variable to True.
Otherwise, you'd need to add some other condition(s) that would prevent the existing trigger from re-running.
- BeckyLiu-KatzCommunity Member
Hi! I tried both solutions suggested above, and neither of them worked for me. Not sure if I did them correctly, but I am uploading the slide for you to mess with. Again, I am trying to get the Match # Correct slides to only appear when those particular matches are made, and not pop up again.
I believe this is JUST the single slide containing the game.
Thank you all for your much-needed help. (please ignore the bad design - I'm going to be going back to re-do colors and logos)
- RonPricePartner
Thanks for sharing the file. It is the entire project. Is there a particular slide where the issue lives?
- BeckyLiu-KatzCommunity Member
Oh geez. I thought it only exported the single slide. It's slide 2.10.
- NedimCommunity Member
Try this:
Trigger on the base layer
Trigger on each Match X Layer - BeckyLiu-KatzCommunity Member
Thank you!
I tried it, and it was the same issue as before. The Balloons layer showed before the last "match correct" layer with info popped up.
- NedimCommunity Member