Using Rect(), I created 4 points as follows. (The co-ordinates are fake for now, cause my exacts co-ordinates are too long). The points are place in a diamond shape.
var p1 = Rect(x1,y1,10,10); var p2 = Rect(x2,y2,10,10); var p3 = Rect(x3,y3,10,10); var p4 = Rect(x4,y4,10,10);
This is how it will appear.
[p1] [p2] [p3] [p4]
The player can use their fingers to move through the points to draw symbols. For start, I allow the users to draw Lightning, ^ and inverted ^. So lets say if player touches in the following sequence : (p1,p2,p3,p4). It draws a lightning shape. The player can also draw (p1,p3,p2,p4) to draw a reflected lightning shape. For the ^, the sequence is (p2,p1,p3) or (p3,p1,p2). For the last one, (p2,p4,p3) or (p3,p4,p2).
I tried using booleans but it ended up causing some booleans to be triggered unintentionally. I heard from my friend something about getting them into arrays but I got stuck at how to detect the sequence in the array.
Anyone can help?