What's the easiest way to work with tons of text? [Solved]

Get help using Construct 2

Post » Tue Apr 08, 2014 3:36 pm

Can you attach the capx?
Go full editor - and upload attachment and attach the capx of your test.
That will save us time. I suspect your json isn't formated correctly.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Tue Apr 08, 2014 3:59 pm

sure thing.. here it is https://www.dropbox.com/s/dvfxbtsi4rk7d1j/PunTest.capx

yea i just want the simplest way to call on text information and put that information where it needs to go. :)


Thanks!
Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Tue Apr 08, 2014 4:18 pm

DUTOIT wrote:Can you attach the capx?
Go full editor - and upload attachment and attach the capx of your test.
That will save us time. I suspect your json isn't formated correctly.


Sorry to butt in, but I'm also trying to learn how to use json files.

I'm trying to populate a dictionary with a json file. But when I try to get the values from the dictionary (after the loading is completed) I only get a 0 on each of them. I guess my json doesn't have the right format.

So I'm trying to manually populate the dictionary and then Download it as json (so I can inspect the file and see the format) but I can't find the resulting json file. So...

When you Download something as a json file where is it stored?

(For example: In the capx you provided, after populating the array you download it as json with the file name "carddata.json". But where can I find "carddata.json" ? I can only see the project file "CData2.json".)


EDIT:
lol, I found my answer. I had node webkit for previews. I changed to Firefox and after running the project now I see it ask you where to store the file as any regular download. So, please omit this post.
B
28
S
3
G
1
Posts: 29
Reputation: 1,698

Post » Tue Apr 08, 2014 5:21 pm

ah yes i was going to say, the demo that was provided for me was a file.. but watch out to not click always allow.. it freakin' goes on a save frenzy.. had i think bout 80 files generated on my computer before i could end task! :)

Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Tue Apr 08, 2014 6:32 pm

@part12studios,

Yip, your formating was wrong.
Attached corrected puns.json it works now.

Sidenote: see my gravatar - that's my son, and his name is Caleb too :lol:
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Wed Apr 09, 2014 2:36 am

Ok so yea I went to a weekly event over at the Cambridge Microsoft office and worked with one of their evangelists who works a fair amount in C2 and we managed to figure out how to get what I need (which if course you've been saying, but I wasn't understanding completely).

{
"c2array":true,
"size":[4,2,1],
"data":[
[["Joke1"],["Punchline1"]],
[["Joke2"],["Punchline2"]],
[["Joke3"],["Punchline3"]],
[["Joke4"],["Punchline4"]]
]
}

Once i got those right and understood how to properly made a 3d array call I now have it working as I was hoping for. If anyone finds this and needs some help let me know and i'll explain what i understand (which is the bare minimum, but i think what i can do now with this will still be a substantially useful feature.

Once again the C2 forum community has been amazing. Thank you so much everyone for your help with this! I'm sure I'll want to do more fancy stuff in the future with this, but for now i'll make this work! :)

Sincerely,
Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Thu Apr 10, 2014 7:01 pm

Glad it works :)
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Thu Apr 10, 2014 7:05 pm

me too! :) thanks @DUTOIT
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Thu Apr 10, 2014 8:53 pm

@DUTOIT and @part12studios

Thanks for all of the hard work here. A few weeks back I made the mistake of doing a big data-loading project like this in XML. Then I realized that I wouldn't be able to export to iOS (my target audience) because neither CocoonJS nor Ejecta allow the XML plugin. I will need to port everything over to JSON instead, and this is just the ticket.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
52
S
17
G
26
Posts: 432
Reputation: 18,084

Previous

Return to How do I....?

Who is online

Users browsing this forum: gameba and 10 guests