User Tag List

Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 40

Thread: Can I Save A Frame Position To A File?

  1. #11
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry just to clarify:
    you need to save "breakable" group positions - but your ini doesn't save them?

    While it correctly saves other groups (foreground, physical etc.)?
    Yes, I need the Group.Breakable positions to be saved. These are the blocks that the user can place. The event is a Create object event earlier in the code. The other Groups save fine.

    Hard to say without having a look at the code - can't see anything odd in the events you pasted
    this may have to do with something else possibly..?

    Sure you're not mismatching .inis since you said you're using more than one
    (in the file saving / file loading action...?)
    or are you using a single ini with more than one "files"
    (you change the file name or set multiple ini objects?)
    Sorry, I should have made this more clear. I was using two .inis when I was trying to figure out the Delete World function, but I have fixed that issue with the File object, and am now using only one .ini.

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Can see no reason why it shouldn't work - particularly because other groups save fine and you deal with all groups in the same way!

    You can't obviously share your file?
    Maybe stripping down extra things and leave only the bug with just a few objects to test?
    (this procedure sometimes leads to finding a solution also )

  3. #13
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try this strategy out, and if it doesn't work I might post the .mfa. I hope it works!

  4. #14
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the simple .mfa. It's how the real game functions, except I save the positions when you leave the Frame, not when you click a button. The saving/loading of the "statue" works, but the Group.Breakable once again, doesn't save.

    Creativity(BUGSOLVING).mfa

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I see.. the issue is due to all the objects having same name (being multiple instances of the same object)

    So you should try a slightly different approach for bricks, see example:

    Creativity(BUGSOLVING)_1.mfa

  6. #16
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks schrodinger. Since things are working in the .mfa I expect them to work in the real game. However, I have multiple blocks in the real game. Would I copy the Event:

    On loop load_bricks:
    ItemValue( "position_saver", "Random_block_X" + Str$(LoopIndex("load_bricks" ) ) )
    ItemValue( "position_saver", "Random_block_Y" + Str$(LoopIndex("load_bricks" ) ) )

    Into every block the same, or would I have to change anything specific in the event?

    Thanks for all the help, we're almost there!

  7. #17
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    You have different block types right?

    Then I would slightly change the code,
    can think of two solutions:

    1) manage different block types inside the same active object ("Random_block") just by saving their different appearence in different animations,
    than set a value in each block to store its block_type
    save block type in the INI: ItemValue( "position_saver", "Random_block_TYPE" + Str$(LoopIndex("load_bricks" ) ) )
    load block type when you create the object
    and on any block creation force animation to block_type

    2) manage different objects with same qualifier and save each of different types with their respective names (make all names same length)
    (fire different foreach loops for each type)
    save "block_name1", "block_X1", "block_Y1" in the INI
    then on loading you can use "create by name" --- expression --- left("block_name", number of characters of name length)
    and then place object X,Y position referring to its qualifier

    if you need I can make an example of solution 1 or 2
    (but tomorrow.. now have to go! )

  8. #18
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey schrodinger, thanks once again for the help!

    I think Solution 1 would be the best for my game. An example would be great if you have the time, because I want to make sure I input the events correctly.

  9. #19
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Ok, here's an example:

    Creativity(BUGSOLVING)_2.mfa

    you can right-click the template to change block type
    I've made 5 block types (different increasing animations) you can make as many as you want
    just make the animation "looping" to make it remain active
    (or else you can "always --> force animation to block_type", whatever you prefer)
    Block "type" will be stored in alt. value block_type of random_block object

    Since we're using only one block, there's no need now for the block qualifier, I've removed that

    for any question drop a line!

  10. #20
    Clicker 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)
    JBoneCode's Avatar
    Join Date
    Feb 2016
    Location
    United States
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I almost have the Save/Load features working entirely, except for two issues:

    1) When I leave the World Frame and reload it, the textures reset to the "NoBlock" texture.
    2) When I close the Application and reload it, the positions don't save.

    I'm hoping this is just some mis-transferred code. Do you know where the source of error could be/what events could be causing this? Thanks!

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Save frame position
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 11th September 2015, 02:48 AM
  2. Save Frame Position Load Application Position
    By NotADuckMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th March 2015, 11:38 PM
  3. Save Frame Position ruins Frame
    By Fralex in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 9th July 2012, 11:08 PM
  4. save frame position
    By babaden in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th April 2011, 04:52 PM
  5. Save Frame Position BUG ?
    By mmf2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th August 2008, 10:39 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
  •