Change the state of object on a layer based on variables

Aug 23, 2017

Hello,

I created a game that keeps track of incorrect clicks through variables for each question.  I set the variables to be equal to the total number of steps in each question.  Each time the incorrect feedback layer shows and the user clicks to close it a point is taken away from the variable for that question.  Their score is then shown on a tracking bar that has an object for each question they have to complete.  The object will change state depending on how many points the user has for that question according to the variable.  My triggers are as follows throughout the game:

Set Task1Score equal to 9.00 when timeline starts.

Subtract 1.00 from  Task1Score when user clicks continue

Change state of Freeform 8 to Correct when timeline starts if Task1Score is greater than or equal to 7.00

Change state of Freeform 8 to Incorrect when timeline starts if Task1Score is less than 7.00

 

These work for all the questions I have created until my results slide.  My results slide is two layers.  A win layer (base layer) and a lose layer.  The variables trigger the lose layer depending on the states of the objects.  If 2 or more of the 4 objects are incorrect state the lose layer shows.  This part works correctly.  However, when the lose layer shows the objects show the normal state.  I used the same triggers on this layer that I have for every other slide.  But since this is a layer, I guess that is why it is causing me a problem.  I read that you can't use a when timeline starts trigger on a layer so I have tried when variable changes and when timeline reaches 0.25 seconds.  Neither of these worked either.

 

Can someone please help me out?  Thank you.

7 Replies
Leslie Farrell

One of these discussion threads said because the timeline only starts once, those triggers don't work on a layer other than the base layer.  I am not sure the exact thread, I have read a lot of them this week.  When the timeline starts  is the trigger I am using right now and it isn't working.  I did try other triggers too and they did not work correctly either.

Wendy Farmer

Hi Leslie

see updates to your file. It's hard as I don't know the correct responses but what I did was to move the tracking bar off stage on the lose layer and let the tracking bar from the base layer show through to the lose layer - that may  work better.

This discussion is closed. You can start a new discussion or contact Articulate Support.