Array Checking

Get help using Construct 2

Post » Tue Mar 05, 2013 1:13 am

@R0J0hound

Heeeeelp!! What should i do. If all the words were found. How should i put it on next layout?

its system then Compare two values then: " what should i put to know if all the words in 'txtWord' is found "

before i make an action: system go to next layout.

thanks in advance
B
4
Posts: 4
Reputation: 508

Post » Tue Mar 05, 2013 1:39 am

@MaddyMouse
If you know how many words are on each layout, then create a global variable to keep track.
Global Variable WordsFound
Each time a word is a found, add 1 to WordsFound

When WordsFound = Amount of words on the level
-> reset WordsFound to 0
-> go to next layout

B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Tue Mar 05, 2013 11:46 am

@ArcadEd
it works!! thanks a lot
B
4
Posts: 4
Reputation: 508

Post » Tue Mar 05, 2013 3:23 pm

@ArcaEd

how did you groups all the scattered letters into one group? Did you use family? (i am only using free edition. i dont have family, is there anything i can do to make it the same??)
B
4
Posts: 4
Reputation: 508

Post » Tue Mar 05, 2013 4:08 pm

I didn't use a family. In my final version of the game I used arrays that that stored the letters.


Then using tokenat I populate the Text Boxes.


This really wasn't an easy project at first, especially if you are just learning construct.

The way I did it was such that I could easily add levels just by updating the 3 main global variables, or even have those global variables updated via an ajax/php action.

B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Previous

Return to How do I....?

Who is online

Users browsing this forum: PixelatedTrip and 0 guests