Home › Forums › Puzzles › Keyboard Events unresponsive after double tapping key event input/function
- This topic has 67 replies, 2 voices, and was last updated 3 months, 2 weeks ago by c4cc.
-
AuthorPosts
-
2023-10-05 at 6:57 pm #67359c4ccParticipant
I did that, it works, unfortunately, it could only rotate facing left and then right. I tried to rotate facing left again, character didn’t do so.
- This reply was modified 1 year, 2 months ago by c4cc.
2023-10-05 at 6:59 pm #67360kdvParticipantThink. Debug. The answer is obvious and is visible in the console log. Read this topic from the very begining to find an answer.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-05 at 7:09 pm #67362c4ccParticipantI simply added “round” to “get Player Petra”‘s rotation as per red box:
Now I can turn around this character facing left or right side whenever I want. Hell yeah. Thanks for the first tip that mentioned applying that round puzzle to
2023-10-05 at 7:10 pm #67363kdvParticipantThe miracle has happened.
One more optimization you can do: move conditions comparing rotation into conditions checking the time interval
First you check the double-hit and if
true
you check the rotation. That will be a little more correct.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-05 at 7:32 pm #67368c4ccParticipantOne more optimization: move conditions comparing rotation into conditions checking the time interval
First you check the double-hit and if true you check the rotation.
How do I do this?
- This reply was modified 1 year, 2 months ago by c4cc.
2023-10-05 at 7:35 pm #67369kdvParticipantYou already did.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-05 at 7:50 pm #67371c4ccParticipantFirst you check the double-hit and if true you check the rotation.
What does this mean? If it doesn’t mean click on “if-do” logic puzzles with get Player Petra Rotation Z, then drag it to the if-do-else logic puzzles…
2023-10-05 at 7:53 pm #67372kdvParticipantWhat does this mean?
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-10-05 at 8:05 pm #67374c4ccParticipantNow I finally get it. Appreciate it
One more optimization you can do: move conditions comparing rotation into conditions checking the time interval
Thanks for this optimization tip, too.
2023-10-20 at 2:47 pm #67749c4ccParticipantDouble tapping with dash functions:
(Instant dash while transform)
(Transform first, then dash)
- This reply was modified 1 year, 2 months ago by c4cc.
2023-10-22 at 4:38 pm #67803c4ccParticipant2023-11-14 at 7:27 am #68522c4ccParticipantVerge3d prevent attacks during double tap
Basic Player movements
https://ibb.co/h2pRy81
2023-11-18 at 7:34 pm #68652c4ccParticipant2023-11-18 at 8:18 pm #68653kdvParticipantVerge3d prevent attacks during double tap
Any “keydown” event will be interrupted if another button is pressed.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-11-19 at 2:51 pm #68658c4ccParticipantThanks for the feedback, but my intention was to disable certain key function/inputs during double tapping
-
AuthorPosts
- You must be logged in to reply to this topic.