For a sorting game, I place a number of TARGET-cards in the layout.
( instances of the same sprite-object, with different "CardFaceFrame" values, but with the identical Frames.
The CardFaceFrame value indicates the CardFaceFrame-number of the object that must be placed on top of it)
Next to these, I place an identical number of Cards, (shuffled), with the corresponding CardFaceFrames showing.
These Cards have drag and drop behavior.
When a Card is dragged over TARGET, I want to do three things:
1. If no other Card ( instance of the same object) is there, the Card must snap to the TargetCard.
2. The value of the CardFaceFrame must be written to an array: CardsPlaced, at the place of the TargetCard. (fixed that)
3. if the array CardsPlaced is filled correctly ( 0,1,2,3 etc.) goto next level
If there is already a Card Instance on the target, it must not be dropped.
I cannot figure out how to check if there is already a card placed.
Any suggestions?
drkoops.nl/puzzle3.0.capx