How do I base a touch off a keyboard click

0 favourites
  • 11 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hi everyone,

    Instead of recreating all the events for touch I want to create only a few events which make touching a left arrow simulate pressing the left arrow key. I want to do this for the right arrow too.

    thanks

  • on tap | Simulate control "Pressing Left"

    You can add either platformer behavior or 8 directional movement

  • did not work because i do not want a platformer or 8 direction

  • Why not put all the actions in a function and call the function depending on either keyboard or touch?

    You might even be able to do it with a simple "or" block, dependng on how you have your events set up..

    on left arrow touched

    or

    keyboard on left arrow key pressed

  • ok I will try but there must be an easier way

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What could be easier than making an "or" block?

  • and how do i make or blocks if there are other conditions that cant be or in the one event

    thanks

  • what would be easier is one evemt saying if this sprite is touched replicate the arrow key touched

  • what would be easier is one evemt saying if this sprite is touched replicate the arrow key touched

    Well that would be the case if you used the function object, right?

    on arrow key touched - call function

    on sprite touched - call function

    But I'm not sure why you'd want to replicate when all can be done in the same event with an "or"

    Usually all other conditions which would prevent the "or" could be placed as sub-events, but yours might be a special case..

    If you could share the event the way it is now, it would be much easier to explain..

  • There are multiple events I would have to add or to. One of them is this for example.

    On right arow pressed

    Sprite1 Animation frame = 26 sprite 1 set animation "Goop"

    Sprite 1 is playing "LTR"

    System shaker = 0

    I want to add an or condition in with still having the three and conditions

    thanks again

  • On right arrow pressed

    or

    touch on touched ArrowRight

    (subevent)

    Sprite1 Animation frame = 26

    Sprite 1 is playing "LTR"

    System shaker = 0

    (action)

    sprite 1 set animation "Goop"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)