0 Favourites

How do I import data from an external source

  • Hi there Constructors!!!!

    I've had this idea to make a "single-screen-at-a-time" dungeon crawler game - but I was thinking of making the sequence of screens random.

    However, I would want to make these screens myself (using a text file, with the walls, enemy start points, etc) by use of ascii characters to represent elements of the dungeon (# for a wall, P for player, G for ghost, T for treasure chest, for example).

    These would be saved in text files, named 1.lvl, 2.lvl, etc, either in an array or just as a long string, to be imported into a pre-defined array to create the levels?

    Now, am I making this too complicated? I'd basically want to be using the same layout and event sheet for each level (which will have, say, 10 or 12 screens each) so, when the player leaves via the screen's exit, it reloads the layout with the next, randomly selected screen.

    Is there a better, streamlined way to do this?

    Thanks guys!

    M

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Why can't you just randomly allocate values within C2? Anyway, I think you can import array string data with json.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
392 34,821
Joannesalfa's avatar
Joannesalfa
Unread hot topic
187 45,138
Yann's avatar
Yann
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff