Thank you for the capx update, Aquanex2.
I've looked into the issue and found the 'after' example is not adding any stars to the StarCountArray.
Before
After
Meaning there's no link between 'CountUp1/2/3' variables and 'AddStars' after the change.
I have one more question for you.
Why would you need an array to store number of stars collected?
I think we can take an easier path and store the numbers directly to the variable.
Here's an example capx I made to demonstrate.
https://www.dropbox.com/s/d48dvvmo43gif ... .capx?dl=0
This is what would happen when I'd go to the 'Level Select' screen without clearing the score.
1. Collect a star.
2. Click [Go to level select without clearing score].
3. Click [Go back].
4. Score is still 1.
This is what would happen when I'd go to the 'Level Select' screen after clearing the score.
1. Collect a star.
2. Click [Go to level select after clearing score].
3. Click [Go back].
4. Score is 0.
Function and array are a superb way of organizing the overall code, but I tend to avoid them because they could be more troublesome to troubleshoot once things start to get tangle up along the way.
I can't use the capx because I'm using version 233. It's the most recent stable beta.
But I see what you are saying.
The reason I used an array is because of something someone else showed me, and it seemed to work.