M
mjeed
Guest
hi everyone
I have two objects (A, B)
objectA moves from right to left
I want to make objectB move next to objectA
If i used this in objectB :
y = objectA.y;
x = objectA.x;
objectB will be above objectA, but I want objectB to be stuck to the objectA on the right.
I trying to add + or - in x (x = objectA.x + 100) this works but I want it to automatically take the correct position without modifying it manually And be I don't have a problem if I resize the object.
I also tried using (x = objectA.x + sprite_get_width(spriteA); ) But it does not give the desired result.
In short, I move objectA from right to left and I want objectB to move next to objectA automatically from the right.
Thank you and i appreciate your help.
I have two objects (A, B)
objectA moves from right to left
I want to make objectB move next to objectA
If i used this in objectB :
y = objectA.y;
x = objectA.x;
objectB will be above objectA, but I want objectB to be stuck to the objectA on the right.
I trying to add + or - in x (x = objectA.x + 100) this works but I want it to automatically take the correct position without modifying it manually And be I don't have a problem if I resize the object.
I also tried using (x = objectA.x + sprite_get_width(spriteA); ) But it does not give the desired result.
In short, I move objectA from right to left and I want objectB to move next to objectA automatically from the right.
Thank you and i appreciate your help.