How do I import data from an external source

Get help using Construct 2

Post » Fri Jun 23, 2017 9:57 pm

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!

Posts: 30
Reputation: 298

Post » Sun Jun 25, 2017 8:35 pm

Why can't you just randomly allocate values within C2? Anyway, I think you can import array string data with json.
Posts: 2,026
Reputation: 43,459

Return to How do I....?

Who is online

Users browsing this forum: duke2704, sebrosen, Yahoo [Bot] and 26 guests