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

2022/5/1

Hello and thank you that you take time to help.

Pasce Pasce

2022/5/1

#
My issue is the mouseclicked method. Or to be more specific the location picker button here is an implement of it:
static Actor attachedActor;
    
    public void act() {
        if(Greenfoot.mouseClicked(this)) {
            attachedActor.setLocation(getX(), getY());
        }
    }
So if i click the button, wich looks except by the following well, Greenfoot stops like when you make use of the Greenfoot.stop() method wich i havent used yet in my project. If you know something about it it would be very helpful to hear that.
Super_Hippo Super_Hippo

2022/5/1

#
Do you ever set the ‘attachedActor’ to anything?
You need to login to post a reply.