User Tag List

Results 1 to 4 of 4

Thread: Perk Limit

  1. #1
    Clicker Multimedia Fusion 2
    Pixzel's Avatar
    Join Date
    Jul 2010
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Perk Limit

    In the game I'm making, you have the choice to purchase perks along your adventure. How do I make it so that the first perk you get will be the first icon to appear in the HUD. For example:

    Right now I have the perks set up like this. When you obtain them, they are in the order like this.


    I want it like this:

    I want them to display in the order your purchase them. Like you buy the purple colored perk first, then you bought the red after that. Not like how it is displayed up there where the perk icons appear in the spot they appear when bought.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Perk Limit

    You could use a list to order them, and add new list items when you buy new ones. Then you can position them based on their list index.

    Although, I much prefer the top one. It keeps a specific order to things. if you just grayed them out when you didn't have them, it would be a lot easier to understand which ones you're missing.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Perk Limit

    I had a similar problem a while ago. There's probably a better way to do it but here's what I came up with (hopefully I explain this well enough)-

    First use either counters or an array or something to keep track of the order the perks were purchased in. So for instance you'd have a counter corresponding to each color (purple, red, green, etc). Lets assume the player purchased them in the same order as your 2nd screenshot above. You would set the purple counter to 1 (purchased first), red to 2, and green to 3. When the value of any of the counters is > 0 and isn't on screen already you create the icon. Then have the icon's position is set according to an equation similar to the following:

    X coord of perk icon = (Value of corresponding counter - 1) * width of icon + whatever extra distance you want between the left side of the screen and first icon

    Assuming your icons are 10 pixels wide and you wanted 4 pixels of space on the left side of the screen (change these values as necessary), here's 2 examples

    X coordinate of purple icon = (1 - 1) * 10 + 4 = 4

    X coordinate of green icon = (3 - 1) * 10 + 4 = 24

    The Y coordinates would be the same for all icons of course

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Perk Limit

    You could also put all your perk icons as directions in a single active object. Then when you purchase a perk, create a new perk active next to the existing perks and set a variable in the perk active to a value that corresponds to which perk was purchased (0 = red, 1 = orange, 2 = yellow, etc...). Then have a set of events that basically set the perk active to a specific direction if its variable equals a value.

    You can simplify this further by having the directions correspond to the variable, and have a single event that just says "Always set perk active direction to its variable value.

    Hope that makes sense.

    Mobichan

Similar Threads

  1. Max((Limit) need help
    By warlords in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th August 2013, 03:19 PM
  2. INI Limit?
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 20th November 2012, 03:39 PM
  3. 34k limit
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th May 2011, 02:18 PM
  4. 3 shot limit?
    By Zambaku in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th March 2009, 04:39 PM
  5. WAV limit
    By DeepGames in forum The Games Factory 2 - Technical Support
    Replies: 9
    Last Post: 24th October 2006, 12:09 AM

Posting Permissions

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