Hello there, to start off let me say that I am an complete noob with Java or Greenfoot.
I have a question about 2 actors moving on the same X-axis like they are "stuck" or "fixed" to eachother.
I have 2 actor's lets say actorX and actorY where my actorX moves horizontally with the left and right button. And my actorY moves vertically with the up and down buttons.
What i am trying to achieve is to get my actorY move to the left or right at the same time my actorX does. I've tried to use actorX.getX() in my actorY code but it needs an reference or something i cant figure out. I've tried the "How to access one object from another" tutorial but it didn't help me.
Basically i need an getX variable from my actorX that i can use in every other actor.
If someone could help me out with a small tutorial that would be great, if been searching for hours.

