Possible problem in Dictionary obj event text?

Discussion and feedback on Construct 2

Post » Sun Sep 28, 2014 8:20 am

I just noticed a possible problem with the Dictionary object's block text.

When I add the condition "Compare current value", the resulting condition in the event block reads "Current key = ..." instead of "Current value = ..."

That is, it says it's comparing a key, when it's really comparing a value.

Does this happen for anyone else?
B
27
S
18
G
8
Posts: 328
Reputation: 6,158

Post » Mon Sep 29, 2014 2:47 pm

Never had a problem with Dictionary. Can you post an image snippet of what your doing.

Also just to let you know. Current Key and Current Value only work right when your doing a specific Dictionary ForEach loop. There is a System ForEach, but Dictionary and Array both have custom loops. These loops use the refernece for Current XY stuff.

So if your doing CompareCurrent value with a CurrentKey and not in a foreach loop from Dictionary. It's going to fail.

"CurrentKey
CurrentValue
In a For each key event, these return the key and its value (respectively) for the current key being iterated."
https://www.scirra.com/manual/140/dictionary
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Post » Tue Sep 30, 2014 9:27 am

Thanks jayderyu,

I'm actually familiar with the built-in iterator for the Dictionary. I'm not having a problem with the functionality. I just think I might have spotted a typo in the text describing the functionality.

I've included some images below.

You can also check for yourself by opening a new project, adding a Dictionary, and then adding the Dictionary's "Compare current value" condition to any event. The typo seems to be in the event block text for that condition.

Walk-through:

Image

Another example where the confusing nature of the typo might be a little clearer.

Image
B
27
S
18
G
8
Posts: 328
Reputation: 6,158

Post » Tue Sep 30, 2014 9:42 am

This is probably a typo, you qhould report it to the bug reports forum in that case
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to Construct 2 General

Who is online

Users browsing this forum: boybacteria, Google [Bot], MadSpy, TheRealDannyyy and 18 guests