I want to have it so that when a sprite is close to another sprite a variable changes. How do I do this??
Offline
when gf clicked If <distance to sprite>=<distance> Change(variable) by [whatever] end
Last edited by FeatherWind (2013-02-25 18:15:23)
Offline
You could also use less than to do that, because the distance might change to fast for the equals operator...
Hope that helps,
CAA14
Offline
How about this??
when gf clicked forever if < (distance to CutieCake v) = (15 pixels) > change Yellow Ball Points v by 1
Offline
I meant:
When gf Clicked forever if <(distance to CutieCake v) = (15 pixels) change (Yellow Ball Points v) by (1)
Offline
Ohhhhhhhhhh... look at this for the if:
if<(distance to CutieCakev)=(15 pixels)
Offline
kayybee wrote:
No, you would want to use a < operator as distance usually isn't a whole number.
Exactly. I had a similar problem with one of my projects, i wanted certain sprites to disappear when their x coordinate equaled -270 x, but i was moving the sprites by -5, and they never got to exactly -270. To fix it, i had to change the "=" sign to "<" sign.
Hope that helps,
CAA14
Offline
Photoguy77 wrote:
I meant:
When gf Clicked forever if < (distance to CutieCake) = [15] > change [Yellow Ball Points v] by (1)
Fixed.
Just curious, who is "cutiecake"?
Regards,
CAA14
Offline