Hi,
I have several graphics/images that I move over other graphics/images.
1) I want to know which zone they are
2) and How these areas would be activated when detect a graph over.
How can I know the name of the object below?
How to approach to with AnimationEngine?
Thanks in advance.
Salut,
Josep
Know the name of the object below
Moderators: heatherlaine, kevinmiller, robinmiller, malte
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Know the name of the object below
Hi Josep,
have a look at
http://forums.runrev.com/phpBB2/viewtop ... ect#p27200
there is a little stack that shows one way how to detect intersects. It uses the control IDs. You could derive a name from that easily.
See if that applies to your problem.
This is not animation engine specific. It is plain Livecode. I think AE also has some intersect detection, and advanced ones too for irregularily shaped polygons. But I don't know for shure.
regards
Bernd
have a look at
http://forums.runrev.com/phpBB2/viewtop ... ect#p27200
there is a little stack that shows one way how to detect intersects. It uses the control IDs. You could derive a name from that easily.
See if that applies to your problem.
This is not animation engine specific. It is plain Livecode. I think AE also has some intersect detection, and advanced ones too for irregularily shaped polygons. But I don't know for shure.
regards
Bernd
Re: Know the name of the object below
Hi bn,
Thanks, it's a posible solution but I need always check all the posibilities, imagine a chess board and you find where is the Queen, I need to check each time all the board positions. I don't know if is the best way
I thinking about two alternatives to check the move:
1) check the tokens after the user move it, looking for the intersects.
2) select the token and show to the user the posibles zones of movement.
Option 1 have the problem of non permited movements, so after check where is the token maybe the user was performed a prohibited movement. It's better for the user move freely.
Option 2 have more control from me, and I think more easy to check so I translate the board to a array.
Thoughts?
Salut,
Josep
Thanks, it's a posible solution but I need always check all the posibilities, imagine a chess board and you find where is the Queen, I need to check each time all the board positions. I don't know if is the best way
I thinking about two alternatives to check the move:
1) check the tokens after the user move it, looking for the intersects.
2) select the token and show to the user the posibles zones of movement.
Option 1 have the problem of non permited movements, so after check where is the token maybe the user was performed a prohibited movement. It's better for the user move freely.
Option 2 have more control from me, and I think more easy to check so I translate the board to a array.
Thoughts?
Salut,
Josep
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Know the name of the object below
Hi Josep,
I am afraid you have to somehow know where your objects of interest are to determine if a moving object intersects.
One way to do that is build an array and test that. It is actually quite fast and works pretty well.
Have a look at
http://revonline2.runrev.com/stack/445/Colorpuzzle
This is one way to know where a puzzle piece is dropped which uses an array. This might apply to your problem.
Kind regards
Bernd
I am afraid you have to somehow know where your objects of interest are to determine if a moving object intersects.
One way to do that is build an array and test that. It is actually quite fast and works pretty well.
Have a look at
http://revonline2.runrev.com/stack/445/Colorpuzzle
This is one way to know where a puzzle piece is dropped which uses an array. This might apply to your problem.
Kind regards
Bernd