using text list blocks or xml

Get help using Construct 2

Post » Wed May 25, 2016 2:46 am

I want to create an adlibs style game.
but instead of typing in random words. I want them to select from my word lists.
and if word cat selected set word list cat items (milk;ball;catnip) would be selectable
if dog selected set word list dog items (bone;chewy;ball) and so on.

I have a basic list of items.
every tick compare TextList
if cat = selected set catlist visible.
If ball = selected set catlist2 visible.
If play = selected set text (The cat loves to play with a ball of yarn.) play (read text Ball of yarn)

does this look to be on the right track or is there a better way?
B
29
S
13
G
10
Posts: 355
Reputation: 8,327

Post » Wed May 25, 2016 7:14 pm

I would use JSON, like:

{"cat": ["milk","ball","catnip"], "dog": ["bone","chewy","ball"]}

unless you need more cross referencing, then maybe a 2-d array would be better. You can still use JSON, just the underlying data structure changes.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: Christmas, Hassan Hackmi, minigame, zenox98 and 6 guests