Best way to populate an array.

Get help using Construct 2

Post » Fri Feb 15, 2013 11:42 pm

What would be the best / efficient way to populate a large 2d array? I'd like to create an array of around 50-100 'monsters' with various stats like Hit Points, Speed, Attack, Defence, something like this:

Orc
10
5
4
3

Goblin
7
8
3
3

Skeleton
12
3
5
3

etc.... At the moment I'm doing something like this:



but wondered if there's a better way?Nickydude2013-02-15 23:44:34
B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sat Feb 16, 2013 12:53 am

I suspect you can do this by loading a JSON file into array (which can be a local txt imported into the files folder in your project). But I haven't done/tried this, atm I just do the same as you as my arrays are small enough.
B
24
S
11
G
5
Posts: 140
Reputation: 5,004


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests