Need help with array

Get help using Construct 2

Post » Sat Mar 24, 2012 6:14 am

Since the graphics for the C2 interface have changed as of R83 I want to redo the tutorial, so it will take a few more days to get it up. However I've posted the finished game in the arcade under Examples. And you'll find the commented capx (less music and sound FX for now) here:

MemMatchTutComplete_NoSound.capxkittiewan2012-03-24 06:15:32
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Sat Mar 24, 2012 7:46 am

Great! Please tell me before i something do wrong, what i should change to get game with 3 pairs of cards or 4 pairs.
B
170
S
3
G
2
Posts: 65
Reputation: 6,057

Post » Sat Mar 24, 2012 11:12 am

To start with you would change the initial value for the global variables gNumberCards, gNumberRows and gNumberColumns. That would make the new tableau size appear correctly.

But you would also have to make some other changes to make the cards shuffle properly. I'll get back to you on those.

I plan to make a second tutorial covering those changes, but I won't make you wait for that.

kittiewan2012-03-24 11:14:16
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Sat Mar 24, 2012 11:31 am

Can you post a tutorial how to do tables highscores? For example, the better the time, the better the end result?
B
170
S
3
G
2
Posts: 65
Reputation: 6,057

Post » Sat Mar 24, 2012 11:54 am

At some point I hope to have a complete framework with splash screens, menu, options, high score, the works. This is the first (and hardest) part.

The change that has to be made to have different number of cards is to fix one place where I missed replacing a hard-coded value. In the second event under "SHUFFLE" THE CARDS there are two lines that include the expression

int(random(0,24))

Change the expression to

int(random(0,gNumberCards))

in both places.

B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Sun Apr 01, 2012 3:38 am

The first three parts of the tutorial Creating a Memory Match Game with Construct 2 are now up. One more to go and then I'll decide whether to do a tutorial on the framework.
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Previous

Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 7 guests