How do I check whether an object/layou has already been used

Get help using Construct 2

Post » Thu Dec 17, 2015 10:06 am

Hi there.

I´m planing a little trivia app ,every layout has one Question and the Answers .
Layout will be loading randomly ,but how can i check if a Layout was allready loaded .
is there a (maybe) simple way to chekc this (write into a Variable )?

Main goal is a trivia app like "You don´t Know Jack" maybe someone know this funny Trivia Game.

I found Tutorials where they use Array´s for the Q and A but i Don´t know how to use Array´s for loading and playing soundfiles --Question as Text and Soundfile .

Hope Someone understand what i mean and can help.

Greets

Sorry for the bad english i´, from Germany.
B
5
Posts: 17
Reputation: 261

Post » Thu Dec 17, 2015 10:25 am

To check if a layout has already been used, you can set an array that way:
When you wanna load a layout, you check if the array contains the layout name.
If so, reload another random layout
Else, load it and set a new value in the array containing the Layout Name.

On new games, reset the array to 0
Image
B
27
S
5
G
2
Posts: 194
Reputation: 2,968

Post » Thu Dec 17, 2015 10:42 am

ah ok thx ,i have to test this.
B
5
Posts: 17
Reputation: 261


Return to How do I....?

Who is online

Users browsing this forum: bikachu, GabrielBalas, Google [Bot], omnipaws, PixelByPixel and 9 guests