# A challenge of triggers-Winner gets endless praise and kudos

Jun 14, 2012

Ok, so what began as a exercise to teach myself triggers better, has become a obsession to make it work.  What I have, is a piece of a puzzle interaction I will develop.  The final result will be a puzzle of spinning wheels where you have to match the outside numbers to it's neighbors to win.  However, I am having problems with how to setup the wheel so that is rotates correctly more than once.  I have tried all sorts of combinations of states, triggers and variables, but each time it rotates once and then stops.  So I trimmed it down to the basic interaction that works for one rotation and am throwing it out there as a challenge to see who can make it work.

###### 11 Replies

Hugh, I will not try, you have given me a headache for the last two weeks on this one

Phil Mayor said:

Hugh, I will not try, you have given me a headache for the last two weeks on this one

People always talk about the perils of circular logic, but in this case the circle is itself the problem I think.  The lack of a definite end is where I am having problems.

Near as I can figure it's a trigger order issue. Since triggers are executed in order, it's changing during the program and affecting conditions down the line. You may need an external chain to make this work. Take a look at this one. It seems really Rube Goldberg but this gives you additional opportunities to spoke triggers. This relies on a que trigger that shows a layer. This ensures that only one of the root triggers are executed.

Hugh,

Its a puzzler(!) - but I think this might be a solution you are looking for-

I tried a few ways of breaking the "circular logic", then got the idea to add something to the circle instead. I added a fifth trigger to use the normal state as a placeholder for the trigger order sequence. With this in place the wheel works now with multiple rotations, using all 5 states but only showing four (N, E, S, W) after the first click.

When first getting it to work, I used one of the built in characters with 4 different expressions to test it out. I added it in as a second slide in case you would like to take a look. Hope this is of help!

Greg's got a simple solution as well. It's an order of operation issue.

I like Steve's spoke idea!

I was wracking my brain all lunch and came up with a solution something similar to Greg's, but less elegant.  And I really like Steve's spoke idea.  2 weeks of brain wracking can end.  Thanks for the help guys.  Here is my solution as well as a crude version of the puzzle wheel game.  A lot more triggers and variables will be needed to make sure it checks for multiple solutions (I limited it in this example to having 1 as the first number on the west).

Cool puzzle and great concept!

Another idea I though that is could be used for is simulating dials and nobs on electronics.  You can setup a graphic of say 4-8 stations and as you change the dial the audio clips change to different stations.  Or different video clips could be changed on a mockedup tv.

Hugh

Interesting challenge.  If you are willing to use javascript to generate a random number, it is rather easy to accomplish.  Unfortunately, it eliminates the iPad.

Demo

Story