Skip to main content

Forums

This topic contains 2 replies, has 2 voices, and was last updated by  Eliquids 1 month, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #282638

    Nigan
    Participant

    Hello, so I’m learning html5 game programming and I’m now programming a game and I have an issue with simultaneous keydown
    for example I want here to move the plane with the arrows while firing with space
    I need help plz
    Thanks !

    function fire(event){
    if (event.keyCode == 32){
    bullets.push({
    bulletx:planex+90,
    bullety:canvas.height-120
    });
    }
    }

    function moveplane(event) {
    if (event.keyCode == 39) {
    if (planex > canvas.width-200){planex=planex;
    }
    else
    {
    planex=planex+planespeed;
    }
    }
    if (event.keyCode == 37) {
    if (planex canvas.width-200){planex=planex;
    // }
    // else
    // {
    // planex=planex+planespeed;
    // }
    // }
    }

    #282647

    Nigan
    Participant

    Hello, so I’m learning html5 game programming and I’m now programming a game and I have an issue with simultaneous keydown
    for example I https://showbox.bio/ want here https://tutuapp.uno/ to move the plane with https://vidmate.vet/ the arrows while firing with space
    I need help plz
    Thanks !


    Thank you my issue has been solved,…..

    #284921

    Eliquids
    Participant

    hey I’m new to htlm programming but need to learn it buy e liquid in india

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star