Array loop

Get help using Construct 2

Post » Thu Nov 21, 2013 7:15 am

I found this in a tutor

where it loops with Array.At(Text.IID)and fill in the text objects
form IID 1 - 20

Can I somehow loop through the Text object names, eg TxtHighscore1, TxtHighscore2 ,
TxtHighscore3, TxtHighscore4 .................TxtHighscore20

:-) flemming
B
33
S
17
G
11
Posts: 350
Reputation: 8,695

Post » Thu Nov 21, 2013 8:52 am

Well if it is the same object:

for each TxtHighscore: set text to array.at(txthighscore.iid)
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Thu Nov 21, 2013 9:09 am

Hi thanks for reply

But the thing is that the idd is broken so it dont fill in all text
objects, my 20 text objects iid goes from 390-398 401-412
and it only fill the first.

therefore I would like to use another way

hope you see my point



B
33
S
17
G
11
Posts: 350
Reputation: 8,695

Post » Thu Nov 21, 2013 10:06 am

If it doesn't affect all txthighscores you have either already picked only a part of them before going into this event or you try to reference txtobjects you've just created in another subevent of the same event (it is a bug).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Thu Nov 21, 2013 12:47 pm

Hi again

Well dont know esaktly what you mean

so I put the .capx here

Top 10 highscore


Maybe if I gave the text objects diff names
instead of the IID , but dont know how to do that

Hope you got the time giving it a look

Thanks!!!
B
33
S
17
G
11
Posts: 350
Reputation: 8,695

Post » Mon Nov 14, 2016 10:01 pm

Had it ever solved? Having the same issue now...
B
7
S
2
Posts: 7
Reputation: 780


Return to How do I....?

Who is online

Users browsing this forum: evillair, Google [Bot], NumberOne and 5 guests