Filestream, starter issues

About Monkey 2 Forums Monkey 2 Programming Help Filestream, starter issues

This topic contains 6 replies, has 3 voices, and was last updated by  Xaron 2 years, 1 month ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7313

    Xaron
    Participant

    Hey there, I just want to load a binary file and want to store it’s content in either a DataBuffer or into a 2d array. But I already fail while loading:

     

    My map.data is inside “media/gfx/”

    Using that Import I have it within the assets folder then. How am I supposed to read that file? Thanks!

    Another question: I’ve seen that “ReadAll()” method for streams which returns a DataBuffer. I guess that would be probably faster? How can that be used?

    Basically what I want to achieve is to have that data as a collision mask in a 2d world.

    #7314

    Jesse
    Participant

    shouldn’t this line:

    [/crayon]

    be like this:

    [/crayon]
    #7315

    Xaron
    Participant

    Thanks, yes could be. I’ve tried that as well, but it didn’t work either.

    #7316

    Jesse
    Participant

    my fault it’s “asset” not “assets”.

    #7320

    Xaron
    Participant

    No, doesn’t work either. Unfortunately there is no example in the bananas section and the documentation is almost non existent…

    #7324

    AdamStrange
    Participant

    Here’s a quick clip of working code for you:

    #7325

    Xaron
    Participant

    Awesome, thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.