We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Puzzles to slide animation along an X or Y-axis, using keyboard events?

Home Forums Puzzles Puzzles to slide animation along an X or Y-axis, using keyboard events?

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #66974
    c4cc
    Participant

    I wanna use Loops, Variables, Procedures, Objects, and if necessary, logic puzzles, to slide an animation along the X or Y axis at a smooth, visible pace as long as I hold down a key.

    Maybe I’d use a Variables to set the initial position of my Character’s parent object at -0.3 at the Y-axis, using Set Object. Then I’d set a Variables name to the Parent object, to get the latter’s initial axis position.

    For Procedures, I can use loop “repeat while – do”. Problem is, how do I keep adding 0.08 increments to the Y-axis for as long as the key is held down?

    kurumii

    my 2nd attempt to do a procedure:
    kurumii

    • This topic was modified 7 months, 2 weeks ago by c4cc.
    • This topic was modified 7 months, 2 weeks ago by c4cc.
    #66977
    kdv
    Participant

    https://v3d.net/o2p

    and if necessary, logic puzzles

    If necessary? :scratch: Without logic puzzles you will do nothing.

    Puzzles and JS. 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 meaning at all.

    #66988
    c4cc
    Participant

    Thanks for your answer, but for some reason, my character isn’t moving…

    kurumii

    • This reply was modified 7 months, 2 weeks ago by c4cc.
    #66996
    kdv
    Participant

    You’ve made 8 mistakes on the left.

    Puzzles and JS. 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 meaning at all.

    #67008
    c4cc
    Participant

    Thanks. God damn, it should of been made clear that uppercase letter keys are not recognized by the puzzles as key input.

    Also, I wanna make my character turn around 180 (e.g., right to left, or vice versa) after pressing left or right keys twice in a row. How do I use logic for this, given that puzzle logic “and” does not accept number operations:

    kurumii

    • This reply was modified 7 months, 2 weeks ago by c4cc.
    #67009
    kdv
    Participant

    The problem was not in the upper case recognition. WASD – with Shift pressed.

    Puzzles and JS. 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 meaning at all.

    #67028
    c4cc
    Participant

    I see, makes sense.

    Also, I wanna make my character turn around 180 (e.g., right to left, or vice versa) after pressing left or right keys twice in a row. How do I use logic for this, given that puzzle logic “and” does not accept number operations:

    Also, besides this, how do I require two simultaneous key inputs to produce a different function (e.g., key S + 4 to shoot diagonally)?

    #67088
    c4cc
    Participant

    https://v3d.net/o2p

    Also, did you use physics puzzles here? If you did, can you please show me?

    #67089
    kdv
    Participant

    I didn’t use physics puzzles. Every puzzle used in that demo is shown on the screenhot.

    Puzzles and JS. 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 meaning at all.

    #67090
    c4cc
    Participant

    I see. Then how did you prevent the cube from falling through the floor, or going through the walls?

    #67091
    kdv
    Participant

    Objects are not trying to fall down without physics.

    There are no walls in that demo. Only one cube with the “Limit location” constraint applied in Blender and one plane.

    Puzzles and JS. 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 meaning at all.

    #67092
    c4cc
    Participant

    Thanks, your answer made sense.

    Also, besides this, how do I require two simultaneous key inputs to produce a different function (e.g., key S + 4 to shoot diagonally)?

    Also, I wanna make my character turn around 180 (e.g., right to left, or vice versa) after pressing left or right keys twice in a row. How do I use logic for this, given that puzzle logic “and” does not accept number operations

    Better still if the new key event puzzles do not mess up the original one
    :

    I don’t mean to rush you, but I hope you can address these two other questions of mine when you have the time, too.

    #67093
    kdv
    Participant

    That’s your quest. Think. Try. I showed you how to use keys for moving. All the rest is possible but on the paid basis.

    Puzzles and JS. 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 meaning at all.

    #67094
    c4cc
    Participant

    Yes, I did try, as per these screenshots:

    Thanks. God damn, it should of been made clear that uppercase letter keys are not recognized by the puzzles as key input.

    Also, I wanna make my character turn around 180 (e.g., right to left, or vice versa) after pressing left or right keys twice in a row. How do I use logic for this, given that puzzle logic “and” does not accept number operations:

    kurumii

    #67095
    kdv
    Participant

    That was a bad try. It’s impossible to multiply a boolean value (true or false) by 2.

    What are the double click or double key hit? Just two single clicks or hits made within a short period of time (≈0.2s or 200ms).

    Puzzles and JS. 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 meaning at all.

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.