User Tag List

Results 1 to 3 of 3

Thread: Question about Global Values for Multiple-Powerup-Object

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    vSv's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    134
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Question about Global Values for Multiple-Powerup-Object

    Hello there!

    My question is regarding a global value for an multiple powerup, one example would be the energy tanks or missile upgrades from the Metroid series. These powerups can be taken in any order but the game will always know which area they are taken from.


    As I see it, I could either use for example 20 different active objects that looks the same and then 20 different global values where powerup1 would set global value powerup1 to 1 instead of 0 and then always delete powerup1 if the global value was set to 1, and so on for the rest.

    The other thing I can think of would be if I had 20 different active objects that looks the same and then only one global value where powerup1 would be worth 1 point, powerup2 would be worth 10 points, powerup3 would be worth 100 points and so on.
    This would be somewhat easy to track as one could easily se in a string like "000010010101100" which powerups had been taken and not have to reserve 20 different global values just for this one powerup.
    The only real problem with this is that I have to make 20 lines of coding for each instance, that is 20*20=400, which would take a lot of time and doesn't really sound like the best option.



    Is there any better/easier way to use global values for something like this?

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    vSv's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    134
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    Maybe you could use flags? Each missile or energy tank, power bomb, super missile, et cetera, would have a flag which is off. When the object is collected, the flag would be set to 1 and the on-screen symbol destroyed. Global Values, although time consuming and complicated, can also be effective here.
    That does seem more handy, so the global flag-values doesn't reset themselves? If that's the case then yes, that would be much easier! I just thought flags, values etc reset themselves after changing screen as almost every other object such as enemies, blocks and so on seem to do that for me even though they are set to be global.

  3. #3
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OldLongDragon View Post
    I've never tried it. But I assume there is some fairly obvious means to maintain flag values over frames.
    OLD. You assume wrong in regards to Flags. I would endorse global values in this case, as the forum member stated in their first post of this thread. If you have not tried something do not post or recommend anything pertaining to a subject. Me on the other hand can post and recommend because I have examples on my website that I have coded.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Total number of Global Alterable Values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 16th May 2012, 10:08 PM
  2. Quick Global Values/Strings Question
    By CBSection31 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th August 2010, 12:06 AM
  3. Newbie question about global values.
    By Martin in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th May 2010, 10:25 PM
  4. Comparing 2 global values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th January 2009, 04:23 AM
  5. Question about Global values
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th October 2008, 05:11 PM

Posting Permissions

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