• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

coordinate passing.

S

Steve Potts

Guest
Hi folks, I`m having a bit of bother, I think I use `other` but not sure.
I`ve got an object and it moves with keys and rotates, easy enough. I have another object and I want to position it at the same place and angle( so it is on top of it and moves and rotates with it.) , how do I pass the x,y, image_angle of the first object to the second one ?
I`m using a step event with the first object, do I use a step event with object 2 or do I do it all in the first object step event.
cheers.
 

Alexx

Member
Is there just one instance of the main object?
If there is, you can just use the code below, in the other object's Step Event:
Code:
x=obj_main.x;
y=obj_main.y;
If you have a different set up, more info would be needed.
 
Top