User Tag List

Results 1 to 8 of 8

Thread: Collecting Items and having them not come back.

  1. #1
    No Products Registered

    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collecting Items and having them not come back.

    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.
    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

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Basically this breaks down into two problems


    1. Saving collected golden stars
    2. Detecting previously collected golden stars


    Saving Collected Golden Stars

    ​When a star is collected you need the save some sort of Star ID to a INI/Array/external file. This ID can be anything that uniquely defines the star within that frame. Example of IDs are Fixed Values and Star position (if the star does not move). The specific ID does not matter so long as each ID matches exactly one star.

    Detecting Previously Collected Golden Stars

    Once you figure out the saving routine, you can easily detect if a star has been collected. At the start of each frame/level examine the INI/Array/external file for entries which match any ID of any star in the current frame. If any match, that star was previously collected and you can do whatever you need to the star

  3. #3
    No Products Registered

    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So i would need roughly 64 slots in my array?
    Thanx for the reply by the way. I've actually been to your website before on your signature! In search for some help.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    here is an example how to do that, this is only one item but you can keep adding more global values to more items
    global_values.mfa

  5. #5
    No Products Registered

    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it says unknown file format. :/

  6. #6
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you were to go the array route and you had 64 stars, then yes, you would need 64 slots.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Patchman View Post
    it says unknown file format. :/
    Sparckman made the example using CF2.5, which uses a slightly different format from MMF2, meaning you can't open it in MMF2 unfortunately. If you have enough money, upgrading to CF2.5 is probably worth it, with the improved interface, bug fixes, physics movements, the fact that it's still getting updated, built-in ForEach loops (if you don't know what those are then suffice it to say that they are fairly important for dealing with multiple copies of the same object reasonably), etc. If you don't have enough money to or simply don't want to upgrade to CF2.5, then that's completely understandable, and I'm sure someone (maybe even Sparckman if he has MMF2) will make you an example that works in MMF2 instead of requiring CF2.5. I can't make one right now, since it's midnight where I am, but I might be able to make one tomorrow.

  8. #8
    No Products Registered

    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx for hitting me up happygreenfrog!
    Yeah we figured out the issue pretty fast. Unfortunately I can't update at this time.
    I did download the free version and checked out what he got. It was awesome, just not exactly what I was looking for.
    my game is a side -scroller, and within the levels are three hidden gold stars. At five levels with five worlds in those levels, I'm looking at a lot of gold stars.
    One thing i want to try and do is, if the player skips the first gold star in the world, and nabs the last two, when they restart the level, all they need to get is that first one. I think prodigyX is hitting the nail on the head of what i might need to do. I'm just confused. Never really tried my hand at this particular thing in mmf2.
    Thanx again for all the feed back and replies. I've been searching the forums and some topics have come up just like this, but I can;t grasp the concept still. I think concentrating on this one thing has fried my brain. ha.

Similar Threads

  1. Coin Collecting
    By Lukiester in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th April 2014, 02:45 AM
  2. Having trouble collecting posted data from .swf
    By Apex in forum SWF/Flash Export Module Version 2.0
    Replies: 7
    Last Post: 26th February 2011, 02:41 AM
  3. collecting coins (objects) / jump animation
    By catrap in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st July 2010, 05:30 PM
  4. Back To Back Samples (Nevermind, I figured it out)
    By Simion32 in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th February 2007, 04:54 PM
  5. Collecting 2 of something at once
    By dustingunn in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th September 2006, 07:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •