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

2023/3/8

Hey guys bit of a problem

SeargentMitchell SeargentMitchell

2023/3/8

#
I was working on my hit game, big golem extravaganza, and it will be amazing once completed. However I need help in making a working crosshair that follows the mouse and overwrites it too if possible. The point of the game is that you are a cannon shooting golems. How would I go about making the crosshair (the shooting code is already done) -Mitch
danpost danpost

2023/3/8

#
SeargentMitchell wrote...
I need help in making a working crosshair that follows the mouse and overwrites it too if possible. ... How would I go about making the crosshair
I do not believe greenfoot allows access to its Component objects; which means you cannot do anything about the cursor being used. You could create an Actor subclass whose behavior is to follow the mouse and whose instances have the crosshair image. You may want to increase the scenario speed a bit to help in delayed movement of the actor. There may not be a suitable mix of speed and performace for your scenario, however.
You need to login to post a reply.