Home and Away

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 4833
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Home and Away

Post by richmond62 »

Checking if the location of an object is the same as the loc of another object:
-
Screenshot 2024-07-05 at 15.22.16.png
Screenshot 2024-07-05 at 15.22.16.png (67.24 KiB) Viewed 539 times
-

Code: Select all

on mouseUp
   if the loc of img "frog" is the loc of grc "rr" then
      put "Home" into fld "ff"
   else 
     put "Away" into fld "ff"
   end if
end mouseUp
Attachments
At Location.livecode.zip
(9.83 KiB) Downloaded 41 times
https://richmondmathewson.owlstown.net/
micmac
Posts: 163
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: Home and Away

Post by micmac »

Hi Richmond

Would it not be better to use "within" since there is only one point where the loc is the same?

Mic
User avatar
richmond62
Posts: 4833
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Home and Away

Post by richmond62 »

Would it not be better to use "within" since there is only one point where the loc is the same?
Checking if the location of an object is the same as the loc of another object.

I use this code to check if the 2 locations coincide, and NOT if an image is inwith the boundaries of another object: that is something else. 8-)
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests