Create multiple text objects from array.

Get help using Construct 2

Post » Mon Sep 23, 2013 8:39 am

Hey!
Thats the task:
I got an array with text values in it, for example: "one","two" etc.
And i need to create X(maybe a lot, so i dont want to create every object manually) amount of text objects and take their text from array.
And second part: I want to make these objects unique, to link every to audio file with same name "One","Two".. So its like creating playlist, which i take from array. Thanks for attention ^^lightman2013-09-23 14:55:50
B
5
S
1
Posts: 12
Reputation: 477

Post » Tue Sep 24, 2013 8:38 pm

Didnt solve :(
B
5
S
1
Posts: 12
Reputation: 477

Post » Tue Sep 24, 2013 10:09 pm

The first part can be accomplished by using loops. Based on your request, I'm guessing you're not familiar with loops. They are one of the building blocks of programming, so it's a very good idea to learn how to use them effectively. This tutorial is a good introduction to loops and arrays:

Basic Loops and Arrays

Once you're familiar with how loops work, check out this Capx.
B
64
S
19
G
8
Posts: 341
Reputation: 12,195

Post » Tue Sep 24, 2013 11:23 pm

Thanks. I familiar with loops, but im not advanced user at all. So i had no clue how generate different texts with 1 text object. Your example helped me a lot. But using track.filename to play audio by name didnt work for me, so i changed it on Track.Text and it works fine. Thanks again.
B
5
S
1
Posts: 12
Reputation: 477


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests