Hi,Bill
You'll find the tiles mouseX and mouseY in the playfield category of a playfield or of the world.
get an arrow fom object catalog/graphics
move the ble rotation handle sligtly to make te center or rotation visible and move it shift/drag to the foot of the arrow. get the viewer of the arrow category polygon, et the arrow's vertex .cursor to 2 (head of the arrow).
now just build the tiles :
arrow's x at cursor _ playfield's mousex arrow's y at cursor _ playfield's mousey
You probably just need to find where the tiles mouse and mousey were lying, but this will help other people.
Regards
-----Original Message----- From: "Hilaire Fernandes" [hilaire.fernandes@edu.ge.ch] Date: 11/11/2009 02:51 AM To: "Bill Kerr" billkerr@gmail.com CC: "squeakland.org mailing list" squeakland@squeakland.org Subject: Re: [squeakland] point towards the mouse?
You may have to write something like that
script1 self setHeading: (self costume referencePosition bearingToPoint: ActiveHand x @ ActiveHand y)
This example does not work yet, but you get the idea.
Hilaire
2009/11/11 Hilaire Fernandes hilaire.fernandes@edu.ge.ch:
For point 2., you may have to write the script in Smalltalk mode then use the code
ActiveHand x to get abscissa of the mouse pointer
Hilaire
2009/11/11 Bill Kerr billkerr@gmail.com:
- Is it possible to get an arrow to point towards the mouse pointer in
etoys? I can get it to point towards a box which is being moved with the mouse with this script: arrow's heading <-- arrow's bearing to box In the world menu in the playfield pane there are mouse x and mouse y detectors but arrow's bearing will not accept those detectors as input to replace just the box part 2) I also wanted to detect a mouse click but can't see any way to do that. The input pane in the world menu detects last keystroke but not a mouse click. _______________________________________________ squeakland mailing list squeakland@squeakland.org http://lists.squeakland.org/mailman/listinfo/squeakland
On Wed, Nov 11, 2009 at 8:09 PM, p.a.dreyfuss@excite.com < p.a.dreyfuss@excite.com> wrote:
Hi,Bill
You'll find the tiles mouseX and mouseY in the playfield category of a playfield or of the world.
get an arrow fom object catalog/graphics
move the ble rotation handle sligtly to make te center or rotation visible and move it shift/drag to the foot of the arrow. get the viewer of the arrow category polygon, et the arrow's vertex .cursor to 2 (head of the arrow).
now just build the tiles :
arrow's x at cursor _ playfield's mousex arrow's y at cursor _ playfield's mousey
You probably just need to find where the tiles mouse and mousey were lying, but this will help other people.
I've had a go at your instructions Pierre and learnt a few new things but haven't been totally successful with the pointing btw I just wanted pointing at this stage not moving to the mouse as well a worked example would be great if you have the time regards
squeakland@lists.squeakfoundation.org