Interrupting Flow of Actions?

I've created a game in which various message suspended between balloons float up and the user is supposed to click on the "bad" messages and let the good ones continue to float up into the cloud. Each message has a string of actions attached to it, the last of which is to prompt the next message to take flight and go through its string of actions.

However, I wanted to add an exit button that would allow the user to bail on the activity and go back to an earlier page. I added an exit button (which is layered on top of everything else AND has "Always on top" selected), but, when I click on it (even repeatedly) while the messages are going, it doesn't do anything. I'm thinking that, perhaps, it can't "interrupt" the flow of actions that the messages have going on -- it's the only thing I can think of that could be causing the exit button not to work.

So, any ideas whether my guess is right and how I can get this functionality to work? I don't want the learner to feel completely trapped in the game and to have their only recourse be to close the browser window altogether. I have to finish my developer testing ASAP (which is why I'm working on a Sunday), because I have my first user testing session scheduled for Tuesday and I need to know the course will be ready by then. So, I'd greatly appreciate any help/ideas anyone might have as soon as possible!

Discussion (6)

Never mind - I solved this!!

In case anyone else finds this useful, here's what I did...

First, I did deduce that the problem was caused by the ongoing flow of actions, because, if I clicked the exit button a bunch of times very quickly, it would, eventually, work. However, I needed a solution that wouldn't require the user to do that silly rapid, repeated clicking and I figured one out!

What I did was to, instead of putting an action on the exit button to take the user back to the previous page, I put an action that set a custom "ExitGame" variable to 1. Then, on the page, I put an On Timer action to check that variable and, if it was 1, to take the user back to the previous page, and it worked like a charm! :) (I also put an On Show action on the page to reset that variable to 0 so that, if they left the game and came back to it, they wouldn't get automatically thrown out of the game.) It seems that, as I had thought (hoped), the On Timer actions take precedence over all other occurring actions that may be taking place on the page.

undefined

On a separate note....I have a question for the forum moderator(s)....why does the ability to edit one's post go away after a certain amount of time (or maybe it's when you leave the post and come back)? I wanted to update my subject line with a "(Solved)" at the end, but I couldn't edit my post at all when I came back. There also didn't seem to be a way to delete the post (although, in this case, I decided that it would be better to post my solution than to to delete the original question, even if I could).

ARGGGGHHHH! I thought I had this fixed, and I swear it worked once, but now it's not working....from looking at the variables in Debug mode, for some reason, when I click on the X, it's not updating the variable like it should and I have absolutely no idea why!

Super frustrated right now.... :(

Thanks, Math! I did do away with the OnTimer action...it wasn't working and it was slowing stuff down.

I love using action groups. In this case, though, the "chain" is caused by each balloon message having, at the end of its actions, an action to show the next balloon (which then triggers its actions). Unfortunately, most of the actions can't be put into an action group because they're unique to each balloon message....for example, the actions include telling it where to move to, which is unique for each balloon message. I might have been able to put a few actions into an action group -- I honestly don't remember what all of them were -- but I still don't understand why a simple action on a graphic (or button -- I tried it with a button, too) to go to the previous page won't work while the game is running.

I've got someone at Tivantis looking into this for me....if he strikes out, and if I decide that the info isn't too proprietary, maybe I will post the sample here...

Have you reset other variables that may have changed by the partly run page? On complex pages I usually I put an group of actions at the top of a page that explicitly sets the value of all variables in the page to make sure I'm always starting from the same point.

If all fails...you can try Javascript. Both for the combo of actions on the balloons as for the previous page action.

I do think TrivPrevPage() is the call needed to go a page back... or something like that.. i have to doublecheck that...

A few random thoughts..

Do you have the chain of actions added to each clickable element? If so, the use of actiongroups might make it easier to fix. Add groups for each needed chain of actions... on the clickable elements just add a runGroup action.

Timers are unreliable at least. I try to stay away from them whenever possible. Maybe thats possible when using actiongroups. Add a check at the end of each actiongroup whether the variable is set/ the user wants to skip the game.

Regards,

Math

PS. a sample of your Lectora might be helpfull

Discussions have been disabled for this post