Forum Discussion
Game Needs Help
I am pulling my hair out and I hope that someone here can help me with my variables and triggers.
What this game is supposed to do is:
User clicks button to roll di (2) which will add the 2 di variable together and thus change a 3rd variable to that sum.
A game piece's state is changed by the 3rd variable.
When the game piece has its stated changed, a video plays.
Once the video is complete, the slide changes to a MC question. Answer the question and then go back to the game board.
I have not included the actual game as it is massive, but this a scaled version with the interaction all built.
Please, anyone, take a look and help me figure out when is wrong with this. Why do the di sometimes display the wrong number in the summed variable?
Why doesn't the trigger trigger to go to the next slide when the vid1 variable changes after the video plays?
TIA
Ben
- MathNotermans-9Community Member
I couldnot figure out all answers, mostly because errors you mention i did not encounter.
Except for one... not going to the next slide/scene when the video ends.
As i wasnot sure when to go to the next slide i used the helper layer for that. Added a trigger there to go to the next slide whenever that layers timeline ends.- BenjaminCaul477Community Member
Thank you for looking into it. In the game the helper layer is used to reset a variable and the reset was not working without it. I have it set to .25 seconds, so its barely even a pause. The game has to go back to the base layer and the "Jump to slide" triggers have to work from there (if possible).
If the triggers won't work, I would super appreciate an explanation for why. As it is, I cannot figure out why what I have here doesn't work.
- BenjaminCaul477Community Member
I figured it out - the answer wasn't in a helper layer, but in a helper trigger.
I am using the motion animation to add a pause between triggers. I created another motion animation that is set to trigger when the variable on the video changes to True. Then I have the Jump to Slide trigger set to execute when that animation completes. Works!