Best option for choice-based game

Get help using Construct 2

Post » Thu May 04, 2017 12:36 pm

Thank you very much! That is great. I had to add a stop animation event because it just kept going through all the frames, I don't know why your capx doesn't have the same problem, but it works perfect with the stop animation event!
B
5
S
1
Posts: 11
Reputation: 395

Post » Thu May 04, 2017 1:48 pm

@Youtopize - I meant to comment on that :) Double click on the sprite to open the sprite editor, select each animation and in the properties window set the Speed to 0. After that you don't need the stop animation event.
B
19
S
8
G
3
Posts: 425
Reputation: 3,968

Post » Fri May 12, 2017 6:05 pm

Hi @Mekonbekon,

I figured I would address you directly since you are more or less aware of my project and have been of great help to me.

I am trying to set up the questions and answers array in Excel and then transfer it to JSON using the framework that you kindly provided. I have found this website to transfer from xls to JSON:

shancarter.github.io/mr-data-converter/

shancarter. github. io /mr-data-converter/ (here it is again with a spaces in case I can't send links)

The problem is that I can't get it to load the array properly on Construct 2. Being able to manipulate the data in Excel would save a lot of time, so I would appreciate it if you could help me.

Many thanks
B
5
S
1
Posts: 11
Reputation: 395

Post » Sat May 13, 2017 9:26 am

Hi @Youtopize

I'm not sure off the top of my head what the solution is - could you link to the json that the converter creates? It might just be a syntax issue.
B
19
S
8
G
3
Posts: 425
Reputation: 3,968

Post » Sun May 21, 2017 12:07 pm

Hi @Youtopize

Sorry for the delay in chasing this up. Not sure if you've already solved this or not, but I had a look at the converter that you linked to; it appears that the closest you can get to the right format for C2 arrays is the "JSON-Row Arrays" output option. You then have to convert it to this format, which means adding square brackets around each entry:

{
"c2array":true,
"size":[2,3,1],
"data":[

[ [ ], [ ], [ ] ],

[ [ ], [ ], [ ] ],

]
}

A potential downside is that it appears you can't convert 3D array data - i'm not sure if there is even a way to store 3D data in an Excel spreadsheet. Should be good for 2D arrays though! :)
B
19
S
8
G
3
Posts: 425
Reputation: 3,968

Post » Mon Jun 12, 2017 2:52 pm

Hi @Mekonbekon, thank you for getting back to me. I have been postponing this issue because I thought it would be fairly easily solved, but I now see it might be more complicated than I thought. I have been focusing on creating content and storing it in the form of a 2D array in Excel, although I still intend to convert it to a JSON 3D array (to use in the framework that you provided, thanks again for that).

Adding square brackets to each entry and getting to a correct syntax in JSON might be tricky. Do you know a better way to handle the data of a 3D array, that can then be converted to JSON? Or should I just become familiar with the JSON format and store the data in a .txt file?
B
5
S
1
Posts: 11
Reputation: 395

Post » Tue Jun 13, 2017 7:56 am

Hi @Youtopize,

Sorry, I don't know of other ways to handle the 3D data that are compatible with C2.

Using a JSON 3D array is probably your best bet (unless any kind souls on the forums have an alternative). It really doesn't take that much more time to enter data into a json than it would using a spreadsheet system and it also has the advantage that you can format the data with returns, tabs and spaces to make it more legible and suited to the type of data you're adding. If you want any help with the formatting I'll be glad to assist.
B
19
S
8
G
3
Posts: 425
Reputation: 3,968

Previous

Return to How do I....?

Who is online

Users browsing this forum: shawnzien, tatogame and 8 guests