How do I

Get help using Construct 2

Post » Wed Jun 21, 2017 3:02 pm

hello friends
i have a question please
i'm making a puzzle game for kids
what i want to know is :

when the kid choose any random puzzle to play how i can set every piece in this puzzle to be put in it's right place or it make another option like losing life or go back to it's place

( i mean that i don't know which puzzle will be chosen to be played so how to set them all previously ? )
B
22
S
8
G
2
Posts: 78
Reputation: 2,701

Post » Thu Jun 22, 2017 9:51 pm

You would have to find a way to identify the current puzzle with a global variable eg Global variable = currentPuzzle then in Start Layout assigns currentPuzzle = choose (0,1,2,3, n) then another global variable previousPlayedPuzzle = 0 in Start LAyout y When you make the choose of currentPuzzle you place previousPlayedPuzzle = currentPuzzle and leave it saved so that in some way when starting over is not the same puzzle
More graphical:
Define Globals:
currentPuzzle = 0
previousPlayedPuzzle=0

On Start Layout
currentPuzzle = 1 or currenPuzzle = choose(0,1,2,n)
previousPuzzlePlayed = 1

Suppose you win the puzzle:
currentPuzzle = 2
previousPuzzlePlayed = 1
Restart Layout


Suppose you lose the puzzle:
currentPuzzle = 1
previousPuzzlePlayed = 1
Restart Layout


Hope this helps
Image

Image
B
18
S
13
G
23
Posts: 19
Reputation: 13,540

Post » Fri Jun 23, 2017 1:08 pm

@UlisesFreitas thanks i will try this

i meant that i don't want to set every puzzle piece in each puzzle manually by my hands
i wanted every piece to know its logic place whatever the kid any puzzle even he keep playing same puzzle more and more
:)
B
22
S
8
G
2
Posts: 78
Reputation: 2,701


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 35 guests