How do I fetch from Dicitionary

Get help using Construct 2

Post » Sat Feb 07, 2015 11:37 am

Hi,

I have built a form (name, description, count). So the user can enter a new entrie. This will be saved in a dictionary like

  • menucount = 2
  • 1_name = value1
  • 1_desc = value2
  • 2_name = value3
  • 2_desc = value 4
  • and so on..

The menucount will be increased with each new entrie. Then the key will be set to "menucount&"_name".
Now I want to fetch all names (1_name; 2_name; etc.) from the dictionary, but I don't know how to fetch them.

Thanks for any help!
Image Image iTunes: Match3 | Google Play: Match3
B
81
S
27
G
26
Posts: 1,025
Reputation: 24,493

Post » Sat Feb 07, 2015 12:03 pm

https://www.scirra.com/manual/140/dictionary

are you talking about the dictionary expression for retrieving values?

I think you can use for each and use currentkey and currentvalue for what you want to do
B
16
S
7
Posts: 301
Reputation: 2,716

Post » Sat Feb 07, 2015 12:10 pm

Yes I've tried that already.
I don't know how to get only the name entries, like "1_name; 2_name" etc. Is there a way get all entries with *_name (* as placeholder)?
That would be the easiest way I guess.
Image Image iTunes: Match3 | Google Play: Match3
B
81
S
27
G
26
Posts: 1,025
Reputation: 24,493

Post » Sat Feb 07, 2015 12:16 pm

can you paste a screenshot of your events?
B
16
S
7
Posts: 301
Reputation: 2,716

Post » Sat Feb 07, 2015 12:41 pm

Thanks for your help ;) I managed it. I just have created to dictionaries. One for only the name and the second for the rest. So I can fetch it with 'for each value' ;)
Thanks!
Image Image iTunes: Match3 | Google Play: Match3
B
81
S
27
G
26
Posts: 1,025
Reputation: 24,493


Return to How do I....?

Who is online

Users browsing this forum: KittenKatja, MAVERICK, QuantumMMX and 9 guests