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

2014/1/22

How to have an object fixed on another?

y0us y0us

2014/1/22

#
Hi, I want the container, when the crane drops it on the truck, to stay on the truck when it drives away. Now I have done a similar thing to the containers on the ship, when it arrives. If I try to do that on that same manner I have to give the argument 'vrachtvoertuig' (truck) to the container, as it also have '(schip)', like this:
Container container1 = new Container(schip1);
        addObject(container1, sx1-16, sy1-38);
But what I think the problem is, it doesnt allow it to have two arguments. As it gives this error: Whats wrong?
You need to login to post a reply.