Alice Community  

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

Reply
 
Thread Tools Display Modes
Problem whit mouse methods
Old
facup94
Junior Member
 
Status: Offline
Posts: 2
Join Date: Jun 2012
Question Problem whit mouse methods - 07-16-2012, 08:38 AM

I have a problem whit mouse events.
When i click multiple times, the method run multiple times too. But i want the method activates only when is not working at this time.
Sorry for my english.
I looking something like:
if (method is running = true)
do nothing
else
do something

But when i click multiple times this method continues running after i stop click (number of times i click).
Attached Files
File Type: a2w shoot game.a2w (442.3 KB, 3 views)
   
Reply With Quote
Old
zanaqua
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jul 2012
Default 07-16-2012, 12:48 PM

I think this is what you are looking for
Attached Files
File Type: a2w Shoot Game(2).a2w (432.8 KB, 9 views)
   
Reply With Quote
Old
facup94
Junior Member
 
Status: Offline
Posts: 2
Join Date: Jun 2012
Default 07-16-2012, 01:50 PM

Thanks, but problem continue. I don't know if is my PC or what.
When i click a lot of times quickly, method repeats number of times i've clicked.
And i wanna exactly what you do, but alice don't do that. your world is perfect but no work. And repeat I don't know if the problem is on my PC or whatever.
   
Reply With Quote
Old
drellem
Member
 
drellem's Avatar
 
Status: Offline
Posts: 35
Join Date: Jun 2012
Default 07-16-2012, 04:58 PM

Here it is.
I wait for the method to finish before allowing the method to execute with
Wait 0.5
Attached Files
File Type: a2w Shoot Game(2).a2w (446.6 KB, 5 views)
   
Reply With Quote
Old
ogromen
Junior Member
 
Status: Offline
Posts: 1
Join Date: Jul 2012
Default 07-18-2012, 08:00 AM

Go to Google and search for the topic on this forum and some others where the answer could be given.


...............................
Movies database
http://deportedirecto.es/products.ph...52d03706903%29
Start of a new MLM
Homepage and search engine at the same time. This is Napred.BG. Check it out on http://napred.bg

Last edited by ogromen; 05-02-2013 at 06:35 AM.
   
Reply With Quote
Reminder
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Reminder - 07-21-2012, 08:19 AM

Members of this forum are encouraged to not write code for other members, but rather provide pseudocode explanations of possible solutions. Those who continue to write and share solutions will have their posting privileges suspended.

Thank you.


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Unhappy 07-21-2012, 12:31 PM

Quote:
Originally Posted by djslater107 View Post
Those who continue to write and share solutions will have their posting privileges suspended.

Thank you.
Will this still happen if it isn't school? I've helped tons of people with non-school projects.


[COLOR=e4eaf2]Your text here[/COLOR]
Come on, you know you want to try it.
   
Reply With Quote
Same problem for me in all examples
Old
aliceuser504
Junior Member
 
Status: Offline
Posts: 1
Join Date: May 2020
Default Same problem for me in all examples - 06-19-2020, 02:49 PM

You click the mouse 10 times you will be sitting there waiting for 10 animations to play. As far as I can tell there is no way to stop this. If shoot==false, the program simply registers 10 clicks and waits for shoot to be true to play the animation.

Ideally you would only have the animation play once even if the user spams the mouse 10 times, until the animation is over and the gun is ready to shoot again, but that's not how it works.

I think it's a glitch in alice, but maybe somebody has a solution.
   
Reply With Quote
Multiple Mouse Click events
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Multiple Mouse Click events - 06-26-2020, 10:34 AM

I assume that you are referring Alice 3...

In the header for the addMouseClickOnObject Listener event, there is an "add detail" menu. One of the menu items in that menu is "multipleEventPolicy" from which you can select IGNORE. When you click on the object 10 times while the handler is executing, the extra clicks will be ignored.

If you have any other questions, let us know. We can be contacted at don@alice.org


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote
Old
alendrew11
Junior Member
 
Status: Offline
Posts: 3
Join Date: May 2020
Location: USA
Default 10-12-2020, 03:59 PM

Quote:
Originally Posted by djslater107 View Post
I assume that you are referring Alice 3...

In the header for the addMouseClickOnObject Listener event, there is an "add detail" menu. One of the menu items in that menu is "multipleEventPolicy" from which you can select IGNORE. When you click on the object 10 times while the handler is executing, the extra clicks will be ignored.

If you have any other questions, let us know. We can be contacted at don@alice.org
Thank you so much for sharing such a useful in formation. I am very glad to reach here I was founding the solution to this problem and finally I got it....


Throw kindness around like confetti.

Last edited by alendrew11; 11-15-2020 at 09:31 AM.
   
Reply With Quote
Reply

Tags
method, mouse, multiple times

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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.