Match 2 sprites and destroy(Solved)

For questions about using Classic.

Post » Wed Jul 06, 2011 10:04 pm

I can't seem to find where you actually put data in the array... am I missing something ?
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Wed Jul 06, 2011 10:15 pm

B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Wed Jul 06, 2011 10:58 pm

[QUOTE=R0J0hound] Here's an 11 event example.
http://dl.dropbox.com/u/5426011/examples5/cardmatch.cap

[/QUOTE]

Thanks ROJOhOund, this looks promising !

On first run, i noticed that that cap only has 3 animation frames, does it work with 4?




Sorry for silly question ROJOhound, it does !

Thanks for you help.

chrisbrobs2011-07-06 23:05:15
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Wed Jul 06, 2011 11:14 pm

[QUOTE=Magistross] I can't seem to find where you actually put data in the array... am I missing something ?[/QUOTE]


The example cap was just to give you an idea of what i was trying to achieve! Not sure if the values matched my question exactly.
-------------------------------------------------------------

I think ROJOhound has come up with solution though (again)
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Wed Jul 06, 2011 11:50 pm

Here I've done another example using an Array as I explained.Magistross2011-07-06 23:51:12
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Thu Jul 07, 2011 12:03 am

[QUOTE=Magistross] Here I've done another example using an Array as I explained.[/QUOTE]

Thanks my friend, gonn'a try and decipher it!

Will get back to you.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Thu Jul 07, 2011 12:16 am

ROJOhound,

Your example works if i pick 2 matching 'CARDS'.

But if i select a card, then select one that isn't a match to the first one, everything resets and previously matched cards are wiped out?chrisbrobs2011-07-07 00:20:27
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Thu Jul 07, 2011 9:37 am

[QUOTE=Magistross] Here I've done another example using an Array as I explained.[/QUOTE]

Thanks for your help with this, it works but i don't fully understand how!

Can this method be simplified to work without the array ?

For example, the 'picture sprites' are simply given a pv of 1 to 4
(which is the animation frame number) and then covered with a card.

Here's your original cap with my blocks added-

Magistross cap2

Thanks in advance.chrisbrobs2011-07-07 11:45:37
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Thu Jul 07, 2011 12:04 pm

[QUOTE=chrisbrobs] ROJOhound,

Your example works if i pick 2 matching 'CARDS'.

But if i select a card, then select one that isn't a match to the first one, everything resets and previously matched cards are wiped out?[/QUOTE]

I misunderstood step 4 in your first post.

Here is a corrected cap where only the mismatched cards are reset.
http://dl.dropbox.com/u/5426011/examples5/cardmatch2.cap
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Thu Jul 07, 2011 12:34 pm

Thanks ROJOhound, works perfectly now.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 10 guests