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
S
1
Posts: 17
Reputation: 411

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
34
S
6
G
2
Posts: 225
Reputation: 3,357

Post » Thu Dec 17, 2015 10:42 am

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


Return to How do I....?

Who is online

Users browsing this forum: David181, evillair, tarek2 and 55 guests