User Tag List

Results 1 to 3 of 3

Thread: Text to Level load errors.

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Text to Level load errors.

    So, I'm working on this game where you load text files that become levels. I have a few problems.

    Uploaded the source MFA with example txt files for reference.

    Problem 1.
    in the map edit frame (pretty much a big edit box with load, save, and clear buttons), hitting load button should change 'global string A' to the current selected file that is sent in to the edit box object. It currently it does not, and I don't know what to do here. Maybe the Tree Control object can help with this. I'm not sure.

    Problem 2.
    While play testing the game, Hitting [play] with demo.txt selected, then F2 or F5 to back to title, use the arrows to select test.txt and hit [play] will cause a level structure confusion. It ends up loading a portion of demo.txt for whatever reason. I don't know what is going on, or how to fix.

    Maybe someone has some ideas that could help me with this?
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    butterfingers's Avatar
    Join Date
    Apr 2012
    Location
    London
    Posts
    135
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I had a look, but I found it tough to Navigate.

    I also kinda broke the layout in order to get some extra stuff in there (you just need to reduce your application frame size by 200 to get it back to how it was, but initially run it broken so you can see the changes properly).

    In the editor frame I've made it so that you select the file you want to load from TreeControl - click on the file you want to load in the tree control window, then click LOAD to load it.
    This will also set the file to GlobalA (so that if you press PLAY in the editor, it will load the correct level).

    To fix your second issue, I just edited line 17 in the Title screen. It was using the wrong command for the Tree Control. It now loads the correct level data when you hit play, you can go back and forth between your different files.

    I hope this helps (and I hope it's what you wanted).

    I can see you obviously like using behaviours - it's a personal preference, but they make it super hard for someone else to read your code, because some of your events are "hidden" in separate behaviours.
    I'd also highly recommend renaming your alt variables to more descriptive names than the default Alterable Value A.

    Overall tho, there is some elegant code here, I like the editor and the fact you can run it live - I've done similar things before, if you're interested in a more graphic interface (instead of text), I might have some stuff that could help.
    The game is cool too btw. I actually played the demo level and enjoyed it.


    Text Levl MFA(1).zip

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I've actually solved my problem with #2. It appears that it was an issue with the Textfile Object itself that was causing problems. Apparently, the Textfile object does not overwrite old text if new text is not found when I use it's gettest$ function. So I re-wrote the code using the Edit Box object instead.

    As for problem #1, I was able to add a couple more global values/strings to store to make it work the way i need it to.
    I think that original upload, it appears I didn't identify any global values or strings. But now adding 2 global strings (1 to get the file name, and 2 to store the text read/obtained from the file).

    Your file only contains .001. Not an MFA, Is that a mistake?
    Well, Thanks for the help anyway though.

Similar Threads

  1. Level load - Change frame based on position
    By Vetmora in forum Fusion 2.5
    Replies: 6
    Last Post: 14th June 2018, 07:05 AM
  2. Save/Load text?
    By edbddaniel in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd July 2009, 02:57 AM
  3. Level Editor and Load Example for Game_Master
    By Brandon in forum File Archive
    Replies: 1
    Last Post: 17th March 2008, 02:07 PM
  4. Load Level after Last Completed (saved) Level
    By Diepek in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd January 2008, 09:50 AM
  5. Can I load a level *before* the transition?
    By JohnC in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd November 2006, 06:59 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
  •