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
46
S
17
G
18
Posts: 847
Reputation: 13,802

Post » Wed Jul 06, 2011 10:15 pm

B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

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
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

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
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

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
46
S
17
G
18
Posts: 847
Reputation: 13,802

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
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

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
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

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
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

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
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Thu Jul 07, 2011 12:34 pm

Thanks ROJOhound, works perfectly now.
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests