User Tag List

Results 1 to 5 of 5

Thread: Unlocking permanently (saving progress)

  1. #1
    No Products Registered

    Join Date
    Jul 2015
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unlocking permanently (saving progress)

    Hey. I'm making a game where there's a counter saying what time it is (3AM, 7PM, etc.) and the time and colors change too. (e.g: when it's 12am it changes the animation of the place to night.) I really like the idea i got (hopefully nobody got it before, haha) but what i want to do is (be aware i always say "what i want to do" in my posts) is that in certain times, you can play as different characters.


    At the start, you can choose 2. there's other 3 but are locked. you can't choose them. So, when the counter saying the time turns to a certain time (12am let's say) a new characters is unlocked and a message saying so shows. so when you return, you have 3 characters. and when you close, it will stay there.


    This is INI stuff, i know, and that's why i'm asking. i don't know how to use it.

  2. #2
    No Products Registered

    Join Date
    Jul 2015
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    another bump

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jul 2010
    Location
    Belgium
    Posts
    244
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It's not INI stuff. You just check the current time and make actions accordingly.
    One way of doing it would to have your different characters in different groups, and (de)activate those groups depending on what time it is.


    Edit:: okay, the unlockable stuff could be INI stuff. I'm sure you can find a tut on using INI

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can use the date and time object to get the current time from the user's computer. Then you can compare that time using the "compare two general values" special condition and set the actions accordingly. INI is actually pretty simple to understand. The format that the INI file follows is below:

    [Group Name]
    Item Name=Value1
    Item Name=Value2

    So you first set a group name. Within this group you set item names. You can change these item names and save them to an .ini file. For example.

    [Inventory]
    Slot 1=Bow
    Slot 2=Sword
    Slot 3=Key

    So retrieving item "Slot 3" from the "Inventory" group would return "Key". You can have multiple groups within your INI file. This makes it easy to organize and retrieve data that you have previously saved in your game. There's also an INI tutorial on clickteam's site.

    If you try to write to an ini file in your game, you can test it to see if it's correct. INI files can be opened in any text editor. You should see the same format above in your INI file. If you're having any problems, try to look at the INI file to make sure you're correctly spelling your group and item names when retrieving them. However INI files are easy to manipulate outside of the game so it would be easy for someone to cheat in your game. Maybe try embedding the ini file in your exe or try encrypting it if you're that concerned about the security.



    The conditions and actions are straight forward to understand. Set Value is for numbers, while Set String is for letters. So for your game I would assume it would be something like this:


    SETUP FILE

    * Start of Frame
    - INI: Set current file to "Apppath$+Filename.ini" (this will create the ini file in the same location as your .exe)

    UNLOCKING / SAVING A CHARACTER TO INI

    * Compare the counter to a value = 12 (Your Time Counter)
    * [Special condition > Compare 2 general values] GroupItemString$( "Ini", "Characters", "3") <> "YES"
    * [Special condition > Limit conditions] Run this event once
    - INI: Set String (Group - Item); Group Name= "Characters"; Item Name= "3"; String= "YES"
    - Display message about unlocked character in-game

    You just created an INI file with the group name "Characters" with the Item "3" set to "YES". This means character 3 in the game is now unlocked.


    LOADING EXISTING SAVED CHARACTERS INTO GAME

    * Start of Frame
    * [Special condition > Compare 2 general values] GroupItemString$( "Ini", "Characters", "3") = "YES"
    * [Special condition > Limit conditions] Run this event once
    - whatever unlock character actions you have in your game

  5. #5
    No Products Registered

    Join Date
    Jul 2015
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks sumo, i'll try it out! i'll say my results.

Similar Threads

  1. IOS Camera - load photo into app permanently
    By aenever in forum iOS Export Module 2.5
    Replies: 9
    Last Post: 13th May 2015, 01:18 AM
  2. Saving progress when Call comes in
    By Perry in forum Android Export Module 2.5
    Replies: 0
    Last Post: 1st October 2014, 12:04 AM
  3. Permanently Destroy an Active?
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th March 2012, 03:54 PM
  4. HELP - Change icons permanently?
    By Madness in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th October 2007, 01:01 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
  •