[solved] stop array from filling with duplicate name/score?

Get help using Construct 2

Post » Thu Dec 01, 2016 12:37 am

FINALLY! I got the array to show the names and scores on the leaderboard layout. But now, every time i go to that layout, the same name and score is filling up the array.

If anyone has any idea why and can help with this, it would be extremely appreciated.

capx


*note - after the 1st time playing and saving the name, go 'HOME' then 'OPTIONS' then 'LEADERBOARD'. Repeat and you'll see it filling the screen.
Last edited by jeffige on Thu Dec 01, 2016 7:52 pm, edited 2 times in total.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Thu Dec 01, 2016 12:37 pm

Because you have logic in event 7 on leaderboards where you add a name to the array, which is fine when you go to leaderboards at the end of a level but if you go to leaderboards from the main menu it tries to add a new name with the same logic.
B
47
S
17
G
81
Posts: 2,224
Reputation: 48,095

Post » Thu Dec 01, 2016 1:18 pm

@plinkie

That's what i was thinking. But i need to figure out the logic that will stop that if the playername and score are the same.

I tried adding the events to a group starting with line 2 and if the playername and score are the same, then the group gets deactivated.

Didn't work. I think my brain is turning to mush.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Thu Dec 01, 2016 7:52 pm

Stare at it long enough you're bound to figure it out.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests