I will try to explain it again as well as possible.
First of all, you need Lua to do this, so you have to learn Lua. Go to my previous post and click on the link that takes you to the wikia. Learn it, then come back.
All set? Good.
You want to make collectable stars. Once the player gets these stars the star count will go up, showing the player the total amount of stars he collected thus far. All good up to this point, right? This is an inhereted feature of SMBX, but for some reason, whether it be because Redigit couldn't figure out how to program it in a different way or he intended for it to work that way, you can't place two stars in the same section because once you test the level one will always desappear. You are not allowed to have multiple stars in one section, at least not in vanilla SMBX.
However, there is a workaround that requires you to use Lua, the coding language I just mentioned. You need to recreate the star system working the same way as it does on vanilla SMBX but without that dumb limitation. To do this you need to understand how the stars work on vanilla SMBX, which I explained on the first paragraph of this post. Now to the most entertaining part, to create.
We need and NPC to replace the star NPC altogether. This is because the way the regular stars work don't allow for multiple stars in one section. My suggestion is to use the SMB1 Axe, it plays no sound and allows to work with events and layers, perfect candidate. All you have to do is replace the star graphic with the axe graphic and add a npc modifier with npc codes to change the specifics of the axe entity. You can see how to do it here:
viewtopic.php?f=35&t=425&hilit=nogravity (go to npc codes)
Cool, we have succesfuly replaced the entity for out star. Let's move on to the system. Each star throughout the game works as a separate entity. Let's say you have level 1 which has three stars. You collect the first one and you can see on the HUD "*star icon* = 1" showing you have collected one star thus far. Since we are not relying on SMBX's default star system anymore we need to print that to screen ourselves. I could go on about how you can show it, the aesthetics that you should use and such, but this is really something you should do on your own. Design how you want it to appear on the HUD, how does it keep track of the stars, does it show a star icon or image somewhere on the screen with numbers next to it? Or maybe there are three empty star slots that fill in as you collect stars. Go crazy.
I can't really explain it all here. It would take me at least two hours to explain everything and this post has gotten big enough as it is. What I can tell you is that you need the following:
- Graphics for the new star counter.
- A custom API to hold information on the stars the player has collected.
- Events that trigger upon each star death. You must use a different event for each star death.
- A layer for each star. Each and every star must be attached to one layer, and each layer must only be attached to one star.
I know I don't say much, but I really can't nor want to spend that much time or words here when it all boils down to learn the basics of SMBX and Lua. I hope you manage to make this work. Or you could always get a programmer for your episode. Anyway, good luck.