User Tag List

Results 1 to 5 of 5

Thread: Retrieve INI values from previous frame and use in a calculation?

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2016
    Location
    Utah, USA
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retrieve INI values from previous frame and use in a calculation?

    I am a little over my head here. I will try to explain what I am trying to do. I want to have the game to calculate the percentage of bad (asteroids,aliens) player has killed in a level and reward either one, two, or three stars in the next frame. So I made a group called LevelOnestats with items including one that calculates the reward. I need to have that value brought up in the reward frame ( but since this will happen with each level) I was hoping I could have a command that said pull up that value from previous frame. So that is the first problem I can't seem to solve.
    Second and even more difficult, I would like the game to somehow compare that value "Reward" to a set of values.
    0-10 you don't get a star, but rather a string saying "Try Again" comes up
    11-30 star=1 and string "nice shooting comes up"
    31-60 star=2 and string "wow" or something else
    61-100 star=3 "Amazing"
    I am trying to figure out how to use the INI object, but I'm really not a programmer and this is beyond me. I'm probably making it harder and more complicated than it should be. Would someone take a look a my file and give me some pointers? Would really appreciate it. So far the tutorials and discussions I have found on the forum are too complicated. Thank YOU!!! https://www.dropbox.com/s/gudrtbjcx5...oter5.mfa?dl=0

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,337
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You don't need to use an ini file to carry values over from one frame to another. You can either use a global value, a global counter or an global active object's alterable values to do this.
    You may however use an inifile to store the number of stars earned on that level after the calculation is finished.
    I assume you know how to calculate the percentage, so after you have that value, comparing it to be 0-10, 11-30 etc is very easy. If this value is in a global value, simply compare that global value to the ranges you want:
    Example: If VALUE is greater or equal 0 and VALUE is lower or equal 10 -> Try again!

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2016
    Location
    Utah, USA
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Popcorn,
    I guess the reason I didn't use global is the values were specific to each level, but I think I understand. Where do you find the command to retrieve a global value and use it in a calculation? Like if I made "Reward" a global value, How do I set that up in the editor? I can't find the right condition to pull up the value and what menu I would find "compare to a value"? Could you give me a brief example of where I find the commands in the editor? I've probably made this much more complicated than it needs to be just because I can't figure out where the correct statement are that I need. Thanks! I know you know all about this stuff cause I see you have done tutorials and stuff and I have learned quite a few things from you. I appreciate all your help. Cathy

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,337
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Rightclick on the icon of your app in the Workspace toolbar and select properties. In the properties for your app, select the Values tab. Here you can add global values and strings and rename them. Add a value named Reward.
    At the end of each level, set Reward to the reward for that level. You set a global value through the Special Conditions actions.
    To compare the Reward value in the stats frame, use the Compare to a Global value condition from the Special Conditions. If you need to access the global value in the expression editor, simply type in the name of the value (Reward), or retrieve it through the Special Conditions icon.

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2016
    Location
    Utah, USA
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank You!!!

Similar Threads

  1. Replies: 2
    Last Post: 19th September 2015, 02:21 PM
  2. Frame Properties > Keep display from previous frame not working - Beta9
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 31st May 2012, 08:49 AM
  3. Jumping to a previous frame bug?
    By Alonso in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th June 2010, 01:37 AM
  4. Same Position as Previous Frame
    By Jellyfish in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th June 2010, 09:08 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
  •