Hey guys
I am doing a basic drag and drop memory game. Basically you will see a combination of shapes for a few seconds then have to recreate that combination of shapes to move to the next level. I have the basic drag and drop script done, which looks like this for each object:
diamond.onPress = function() {
this.startDrag();
x_pos = this._x;
y_pos = this._y;
};
diamond.onRelease = function() {
stopDrag();
if (this._droptarget == “/idiamond”) {
} else {
this._x = x_pos;
this._y = y_pos;
}
};
Now the thing I am unsure about is the action scripting to track when they place an object in the wrong place, so that I can make it so they have only so many trys (I may decide to do this on a timer instead like most memory games). And tHen the action scripting to tell when everythings been placed correctly to move on to the next level (scene/frame). If anyone has any suggestions or can give me some ideas about how to go about doing these things that would be awesome. THanks
Edit: Ok I think I figured out what I need to know, ill use a counter function in the script so that when it reaches the right number it will go to the next level