How do I compare x value of a sprite with another(Portugues)

Get help using Construct 2

Post » Fri May 27, 2016 5:32 pm

How do I compare a distance x value of an object with the distance x value of another? For example: If spriteBR is on the distance" 10" of the image point 0 (origin) of spritePT----> spriteBR destroy.
So, what I realy want is: if the spriteBR is distant "10" pixels of spritePT or if the spriteBR is between 0 and 10 pixels of spritePT.
I try put other object with that distance, but don't work in all condition of my project.
B
11
S
5
Posts: 23
Reputation: 968

Post » Sat May 28, 2016 6:50 am

spriteBR > is on overlapping spritePT at offset (10, 10) > Do something

or

spriteBR.X < spritePT.X-10 > Do something
or
spriteBR.Y < spritePT.Y-10 > Do something
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273


Return to How do I....?

Who is online

Users browsing this forum: NadeemAbbass, plinkie, Yahoo [Bot] and 8 guests