How do I clear dictionary value?

Get help using Construct 2

Post » Wed Jul 02, 2014 3:09 am

Hi all,

I am having some troubles using the dictionary. I know how to search a dictionary in Python, but C2 seems to be quite different. I have gotten it to kind of work, but it keeps the previous value. how do I clear/reset the dictionary value?


thanks,

Adam
You do not have the required permissions to view the files attached to this post.
B
16
S
4
Posts: 69
Reputation: 1,834

Post » Wed Jul 02, 2014 7:05 am

Perhaps by using the dictionary action "delete key" or "clear" (remove all keys)?
B
28
S
6
G
7
Posts: 681
Reputation: 5,682

Post » Fri Jul 04, 2014 2:07 am

That just removes all the keys, I tried doing that.

Does anyone know how to reset/set the current dictionary value?
B
16
S
4
Posts: 69
Reputation: 1,834

Post » Fri Jul 04, 2014 3:31 am

You "Add key", "Set key", or "Delete key" as actions. It's not clear what more you want. You get the data with a Get expression.

Event 51 is wrong: you don't need a For each and Has. 'Has' checks the whole dictionary, and is true of false.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Fri Jul 04, 2014 4:26 am

@blackhornet, that is what I thought! But it didn't seem like it was working. I will test it again later on the weekend.

What I want to do is find the right key and then load the game with that value. It works, but it returns the wrong value (the dictionary value I last used).
B
16
S
4
Posts: 69
Reputation: 1,834


Return to How do I....?

Who is online

Users browsing this forum: DolyGamesCosmos and 20 guests