User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: How to Save data across frames.

  1. #1
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to Save data across frames.

    I'm currently trying get my game to save data when I switch frames (Score count, the player position and if a enemy have been killed) and I've heard you guys say to achieve this by using Global Values and stings, But I can't find any tutorials explaining how they work, can you guys help me?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Basically Global Values & strings, is information that can be set/retrieved across any frame in your application.
    So for example if you want to carry over a players position from one frame to the next:

    (frame 1)+ Whatever event that changes the frame:
    Set Global value A to PlayerX
    Set Global value B to PlayerY
    Next Frame


    (frame 2)Start Of Frame:
    Set playerX to Global Value A
    Set PlayerY to Global Value B

    If that makes sense?

    EDIT: Heres a very basic example of what i posted:
    http://game-td.vacau.com/globalvalues.zip

  3. #3
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me it says that file is corrupted, I can't open it or extract it anywhere.

  4. #4
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by macca02 View Post
    Basically Global Values & strings, is information that can be set/retrieved across any frame in your application.
    So for example if you want to carry over a players position from one frame to the next:

    (frame 1)+ Whatever event that changes the frame:
    Set Global value A to PlayerX
    Set Global value B to PlayerY
    Next Frame


    (frame 2)Start Of Frame:
    Set playerX to Global Value A
    Set PlayerY to Global Value B

    If that makes sense?

    EDIT: Heres a very basic example of what i posted:
    http://game-td.vacau.com/globalvalues.zip
    For me it says that file is corrupted, I can't open it or extract it anywhere.

    Edit: Sorry for double posting, but my other message didn't want to appear.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't know what happened there
    I reuploaded it, try the original link and all should be good now.

  6. #6
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well that's what I'm mostly talking about, What I'm actually speaking of is this:

    When you change frames the player's position or where it was created goes into a different area, say f I hav have an RPG and there's a mian and there are houses, each house )let's just now say that there is two) has a different frame, I can enter in the houses easily but when I exit them I end up back at my original position, I want it so that you reenter the main area frame your in a specific position.

    Also how do I do this with a counter?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, you could set a global variable - ie you enter a house on frame 1 then set global variable a to 1 and then goto frame 2.

    Next, when you come out of the house on frame 2, change to the frame 1 (or whever the house door was) and do global variable a=1 position active 340 x 45 (position the character/active to the position outside the door).

    Then change the global variable a back to 0.

    You could also use ini files but could get a bit more complicated...

  8. #8
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see, But know I have another question (I was thinking of making a seperate thread for it but's it's a very similar question and that would be wasting space)
    How would it be possible to transfer counter data across frames and so that every time it increased it stayed like that across frames.

  9. #9
    Clicker Fusion 2.5Mac Export Module
    Zem's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think you would want to make the counter a global object but i don't think counters support being global. (can't remember)

    an alternative would be to use another object such as an array or a string$ object (an object that can be global) most also have alterable values which you could use to increment values, convert the string to value and +1/-1 etc.

    array's i find much more useful for this stuff, i use them for saving positions of all objects, player data, information on objects, dialogues the list goes on.

    hope this helps

    update- - counters can be global (i checked), in the object properties you want to tick a box for "Global Object", another tip would be to rename the object and then drag it into the other frame from the older frame then the two objects will match up and keep the values across frames

  10. #10
    No Products Registered

    Join Date
    Sep 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    More or less: Players score is 250, Player get's money in the first frame then the Player receives +50 and has 300, when the player enters the 2nd frame the player has 300 and if they come back to the first frame they still have 300.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Sharing data between frames (sub-apps)
    By aidmm in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 2nd November 2011, 08:38 AM
  2. How to save information between frames?
    By busmumrik in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th January 2011, 06:46 PM
  3. Storing data over several frames
    By Jason in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th November 2010, 09:18 PM
  4. Trying to save/load between frames
    By frankodragon in forum File Archive
    Replies: 3
    Last Post: 26th May 2008, 06:49 PM
  5. Transferring data between frames
    By Melvin in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th April 2007, 03:26 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
  •