Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mouse event freezes during "do together" actions nested in a "while" loop
todd0312's Avatar
Status: Offline
Posts: 35
Join Date: Sep 2011
Angry Mouse event freezes during "do together" actions nested in a "while" loop - 11-22-2011, 05:09 PM


Actually, I am having a number of issues.

I am making a game - using arrays - in which toruses fall from the sky - in increasing numbers as the game progresses. I have figured out a somewhat simple-minded way to do it, but... the mouse event freezes when I have the rings fall at the same time. A number of things happen when each ring falls, when the rings fall together, each ring is already in its own do together block, and if I have 3 rings falling at the same time, each of those "do together blocks" is nested in - another "do together block". I am guessing (I am new to this), but I am not sure how else to get the game to work, even half-ass as it is.

I have to use arrays for this (yes, it is a school project... and I don't want anyone to do it for me), but I cannot wrap my head around this. I have an "index", but I don't use it directly in the game. I was given this advice, but I still couldn't figure out how to use it:

Use a nested loop (a loop inside of a loop). In the inner loop set the rings to fall using an array with an index. Keep looping while the index is less than another variable called ceiling. In the outer loop increment the ceiling variable so with each pass through the outer loop will cause the inner loop to add another object (ring).

If anyone could look at this (first to test if it even opens); it does on both of my computers, I would really appreciate it.

Should I have my array in a parameter? I just don't get it. I'm not sure what the advice above means as far as setting a ceiling, or where that variable should be set. I am just at a loss.

I don't really care if I don't take advantage of array properties too much (and just use the array in the same way as a list instead). I just want it to work properly at all. If anyone knows that the advice given above as far as using "index" to get the number of toruses to increase as the game progresses, that would be greatly appreciated. It's Greek to me.

I do have sounds attached to the action in the program, but removing them didn't make any difference. I had the same problems with or without them.

Thanks in advance. The world is attached.

Take care,

Attached Files
File Type: a2w torus catch game.a2w (2.80 MB, 6 views)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.