Reporting/sensing coordinates of other sprites

Hi everybody. I am struggling here with very basic things that I tought were easy on Snap, and I dont see
where I am failing.

Basically, I want to make a sprite (lets call it CAR), to glide to the same coordinates where is other sprite (HOME, for example).

So I did this:
When greenflag clicked,

Glide 1 second to X position of Home; y position of Home. Just that. I am just using the moving block glide, the blues ones "x position"
and y position, and the sensor one saying (by default) "costume# of __".

And nothing happens...

HOME sprite is on x=100 and y = 100 coordinates.

The CAR is on 0,0.

I also noticed that if I drag CAR to a random point and then click on green flag, it will glide to the 0,0 coordinates...

Thanks for helping.

Oh. Interesting bug. The OF block is funny and people get confused by it periodically.

You can't drag an expression (such as the X POSITION block) onto the first input. Instead you have to select X POSITION from the pulldown menu.

"But," you say, "there's nothing in the pulldown menu!" This is the tricky part; what's in the pulldown menu depends on what kind of thing the second input is. So you have to set the second input first; then if you set it to a sprite you'll find X POSITION in the first input's menu.

Another way to do it is
preloaded libraries script pic

Done! Tested and worked! Its a tricky bug-like thing, and for some one not aware of it, it would be hard to get there. Thank you very much :slight_smile:

It just one of those things

Because we want a property aaa of an object bbb - the english language says aaa selector has to come before the bbb.

And we all click on the aaa one first (because we normally work left -> right) but the left selector cannot be properly populated until the object we are going to use has been selected on the right.

But maybe it shouldn't show the default costume# - maybe it would be better to have both selectors blank

Note - most blocks have a help on them if you right-click on them :slight_smile: