This site requires JavaScript, please enable it in your browser!
Greenfoot back
jhadad
jhadad wrote ...

2012/9/17

Multiple funtions at one time

1
2
3
jhadad jhadad

2012/9/17

#
Ok its up
jhadad jhadad

2012/9/17

#
And thank you for helping me out so much with this.
danpost danpost

2012/9/17

#
Alright, you meant to say that when you press a mouse button it freezes.
// replace
if (Greenfoot.mouseMoved(null))
// with
if (Greenfoot.mouseMoved(null) || Greenfoot.mouseDragged(this))
This will allow the lighter to move while a mouse button is pressed; but, as soon as the button is released, it will count as a mouse click and go back to the idle state.
jhadad jhadad

2012/9/17

#
No, because I am not clicking the mouse. Try running it, clicking the lighter, then holding any button and moving it around. It will go for a second but then stop until the button is released.
danpost danpost

2012/9/17

#
Are you talking about holding down a MOUSE button or a keyboard button? Keyboard buttons do not freeze the lighter, so you must be talking about the mouse buttons. Use the code I just provided and try it out.
jhadad jhadad

2012/9/17

#
no, i am talking about keyboard buttons. Is it working for you on your computer?
danpost danpost

2012/9/18

#
Yes, it is working fine for me on my computer. Keyboard buttons have no effect on the actions of the lighter except the 'v' key, whose only effect is to light the tinder. Also, mouse buttons will NOT leave the lighter behind until the mouse button is released; at which point the lighter goes into idle state.
jhadad jhadad

2012/9/18

#
Well I have no idea what the difference is between us right now but when I press any keyboard button the lighter and my actual mouse icon stop moving until the button is released.
danpost danpost

2012/9/18

#
FYI, I am running Windows 7. I do not know how other OSes differ in functionality, and I do not know if the Greenfoot team would be able to help; but, maybe this is something that they should look at. Unfortunately, my gut feeling is that there is something wrong with your system. It could be just a setting that needs adjusted; but, this is now beyond me. Hope someone will be able to help and you get things resolved. danpost
You need to login to post a reply.
1
2
3