Unable to pass variables into key pressed block

This doesn't work currently in 6.4.1. This worked this past weekend on a previous build.

can you share a project with that? I can't reproduce it (mainly because I can't put variables in the input in the key pressed predicate)

The fact that you can't place variables in the input is the problem.

I just read the change log of 6.4 and apparently this is a feature and not a bug.
This is what the change log says:
disabled dropping reporters into certain dropdowns (monadic functions, types, costume attributes, graphic effects, layers, audio attributes, pen attributes, dates, relation, keys, video attributes)

Not exactly sure why they would remove this functionality since it is useful for implementing two player controls in games.

Here is an example project that I use it in:

I agree, they should add it back, but in the meantime you can just do
[scratchblocks] (call (<key [ v] pressed?::sensing>@addInput::grey ring) with inputs (key)@delInput@addInput::control ) [/scratchblocks]

Thank you!

It's disabled by Jens, on purpose, two weeks ago. Commit described in the repository as "made sensing attributes menus largely static".
Still accessible by
Make a block II script pic (2)
Not sure it's intended or just overlooked.

I'm so confused, it's always been like that. Maybe Jens accidentally enabled it, but then recently disabled it. I never knew there was a time that you could put reporters in the key pressed input.

I have been using snap for 4 years and it has always been the case that you can put reporters in the key pressed input.

oh right, now I remember. I must've been getting mixed up with the hat block. lol, it's always been like that, and I wish Jens would bring it back.

Maybe this is required for flawless opeartion of the keyboard editing mode.

I support. It was very useful and they should bring it back

yes, we limited the places in which you can drop reporters, because we'd missed some in the past. Those that we've disabled now should only be used with the dropdown, because their content is evaluated differently and mostly not a normal text, or one that is translated to whichever language the Snap! IDE is set to. For example, the "space" key is only named that way in English. We believe that limiting those read-only slots prevents people from accidentally dropping reporters into slots and then having to undo them.

Yes, you can still use the - somewhat kludgy - CALL with input pattern if you wish to query for a set of possible keys. But in most cases you might really just query them directly.

Okay, looking at your car racing project I can see that you designed the cars to be "configurable" with direction keys. While that looks neat at first sight I think the arrow-key names are problematic, because they only work if entered in English. A Vietnamese kid looking at your game will not find those key names in their Snap and it will look like a secret to them. But I grant you that I like that example and will think again about enabling reporters drops for this particular slot again.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.