PATCHMAN Posted November 18, 2014 Report Share Posted November 18, 2014 Hey guys.I've been searching for examples or tutorials about this for the past few days, and I can't anything that makes sense to me.In mmf2, I want to be able to have my character collect golden stars throughout the levels, and I don't want them to appear again.There's roughly 64 of them throughout the whole game.Do I need to make each on of them their own active object, cause that seems ridiculously lame and time consuming.Also is there a way to make it where if the player collects them out of order and replays the level, the ones that he/she collect won't be there?Any examples, tutorials, or just a point in the right direction would be greatly appreciated.-Jay Link to comment Share on other sites More sharing options...
Mr. Potatobadger Posted November 18, 2014 Report Share Posted November 18, 2014 A point in the right direction:Make the star the same object, but make the first alterable value called ID At the start of the frame, spread the alterable value ID Every time one is collected, add to the total of stars you collected (which would be a global value), remove that specific ID from the level forever, and save that you collected said ID to an ini file or something. So, using the saved data from an ini file, at the start of the frame, destroy all of the stars that match a saved ID 1 Link to comment Share on other sites More sharing options...
PATCHMAN Posted November 19, 2014 Author Report Share Posted November 19, 2014 A point in the right direction: Make the star the same object, but make the first alterable value called ID At the start of the frame, spread the alterable value ID Every time one is collected, add to the total of stars you collected (which would be a global value), remove that specific ID from the level forever, and save that you collected said ID to an ini file or something. So, using the saved data from an ini file, at the start of the frame, destroy all of the stars that match a saved ID How do you remove that specific ID from the level? Link to comment Share on other sites More sharing options...
Mr. Potatobadger Posted November 19, 2014 Report Share Posted November 19, 2014 If the save file registers that the ID has been collected (for example, Star ID 27) -Destroy the star if the ID value equals 27 This way, only individual stars will be destroyed, not all of them Link to comment Share on other sites More sharing options...
Recommended Posts