User Tag List

Results 1 to 9 of 9

Thread: Get string in text file?

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get string in text file?

    Is there any way to get a string from a text file? In other words, I want the program I am working on to create a text file with loop points for making ADX files (looping WAV files - useful for video game music) and when the user loads the text file, I want the program to automatically get the strings that hold the loop points accordingly. This is more or less the content the text file will have.

    File
    skullman.adx

    loopstart
    30484

    loopend
    2088409


    I want the program to be able to grab the number strings and place them in the appropriate Edit boxes once the text file has been opened. ANy way to do this or should I start looking into learning Visual Basic for making a program like this? This will go for both the ADX program and my other program for Sidekick 3 Themes. Thanks guys!

    Jesse~

  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,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    You can read strings with the list object,
    though you can probably also use the ini object for this.

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Location
    Ohio, United States
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    You don't want WAVs as video game music. You want OGGs. Otherwise you get a lot of wasted space in your game.

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Get string in text file?

    That file format looks quite simple so why not just load it into a List Object that you place offscreen? It can load a file.

    The best way would be to use a fastloop like this:

    + Start of frame
    ---> [List object]: Load file: [:"blue"]Apppath$ + "somefile.adx"[/]
    ---> Start fastloop [:"blue"]"Load"[/] for [:"blue"]List Nb Lines( "List" )[/] times

    + On loop "Load"
    + [:"blue"]List Line Text$( "List", LoopIndex("Load")+1)[/] eguals to [:"blue"]"File"[/] (using 'Compare two general values')
    ---> [File Edit object]: Set edit object to: [:"blue"]List Line Text$( "List", LoopIndex("Load")+2)[/]

    (repeat the above event for "loopstart" and "loopend")

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    Popcorn and [:"green"]Andos[/], sounds like an idea. I'll try both and see how that works. Thanks!

    FoxBlitzz, it's mostly for the MUGEN Fighting Engine. ADX files, yes are big, but you can have music that normally would not loop endlessly actually do so with ADX. If there was a way to have OGG or even MP3 loop endlessly, I'd look into that, but sadly, that technology has not been invented yet.

    Jesse~

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Location
    Ohio, United States
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    OGG and MP3 can loop endlessly easily. All you have to do is check the sample position and change it. I've seen it done in other games before.

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    True, but to be able to save the loop section in the native MP3/OGG format is not possible. You'd have to have some sort of plugin that reads loop points from an external file and MUGEN has no such way of reading that. As for MMF2 Dev with the ModFX plugin, I don't know if it can do that. If it can, then I can make a program that will make the loop points in an external file and you can just load them via the List Object into any game project.

    Jesse~

  8. #8
    No Products Registered

    Join Date
    Jun 2006
    Location
    Ohio, United States
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    ...

    OGG lets you add attributes and additional comments into the same file for the program to read, you know.

  9. #9
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get string in text file?

    Oh, I see. Well, I'll have to look into that then. Thanks for the info. That will certainly come in handy. Thanks FoxBlitzz and sorry if my posts were a bit annoying.

    Jesse~

Similar Threads

  1. Append a string in a text file
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th October 2013, 08:53 PM
  2. Set edit box text to string$("string object") causes long delay
    By MJK in forum XNA Export Module Version 2.0
    Replies: 4
    Last Post: 22nd August 2012, 02:58 PM
  3. Aligning text in a string
    By RayMarble in forum The Games Factory 2 - Technical Support
    Replies: 0
    Last Post: 22nd June 2008, 04:25 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
  •