Forum Discussion
CaitlinGraham
11 months agoCommunity Member
Help creating a bar which counts found objects using variables/states
Hi folks,
I'm new to Storyline, so I apologize if this seems obvious, but I feel like I've tried everything and am at my wit's end. I'm trying to create a game where you have to click on all of th...
MathNotermans-9
11 months agoCommunity Member
I do think its quite easy to solve. Now you have a trigger on your questions like this.
'Set hoaObjects to 1'... and the same on all questions... thus it will be set to 1 always.
Change that to 'Add value 1 to hoaObjects'. Now the variable hoaObjects will increase (+1) when clicking more objects.
Also i donot see any trigger affecting the bar.
Best option is adding a trigger to the 'hoaObjects' variable. When that changes... change the state of the bar. Proper naming of elements in your view is important, as it makes it way easier to work with. Make a habit of that. I renamed 'rectangle4' to 'progressBar'.
A quick test with 1 or 2 of the elements changed... and it works as expected.
Good luck,
Math