I'm working on a game — Solitaire — and I need some help sensing the layer.
The <touching [mouse-pointer]?> isn't really doing what I need, because it is regardless of layer.
I'm working on dragging the cards, using that technique, but I only want it to go if the one above it is moving or if it is being clicked.
Each sprite has a private variable — moving? — which is set to 1 if it is moving — if it is being dragged or <([moving?] of (sprite above me)) = [1]>
(Sprite above me is also a local variable each has; that's working already.)
How do I only say that it is being dragged itself if it is in the top of the card — i.e, checking if it is the lower layer being touched? (They are on top of each other going down.
)
Credit will be given.
Last edited by scimonster (2011-07-11 01:26:49)
Offline
Taneb wrote:
The easiest way would to give them all a variable "layer" and whenever the layer changes, also change this variable
I'll try that...
Offline