Hi to everyone! I've recently started a new project that clearly exceeds my knowledge of the program, so i'm going to need a lot of help. Through this I expect getting to understand better the basics of the program and be able to solve my own problems.
Here is my doubt:
How can I identify an object by a certain instance variable?
I mean, I have an object with two instance variables, positionX and positionY, an a grid formed by squares, each of which have two instance variables, positonX and positionY.
How can I make that the object appears on the square that have the same vallues at positionX and positionY that the sprite have?
Can I do something like: "set X to square(positionx=Sprite.positionx).x" ?
Yes, I've tried this and of course didn't worked.
Thanks in advance.