Touch/Keyboard Question

0 favourites
  • 10 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Is there anyway to have an object being touched simulate a keyboard key being pressed/down. I'm not using behaviours for this at all. There must be someway to have something like...

    If object.InTouch = True Then

    KeyboardKey.Down = True

    End If

    Is there anyway to accomplish this without behaviours through purely the event sheet?

  • it's really just the ability to tell the system a keyboard key has been pressed without the user actually needing to press the key

  • I've tried using the keycode and extra expressions plugins but haven't been able to get anything to work, is there really no way to do this?

  • There may be a way to work around this, depending on what result you're looking for. What would pressing the key do?

  • I'm not really sure that "KeyboardKey.Down = True" is even programatically possible. Aren't key states read only?

  • I basically want to trick the system into thinking a key has been pressed when it hasn't. It's meant for an easy to event, multiple control system engine. I've found a work-around, it's long winded, but seems to work. I'd rather just be able to manually tell the system that a key has been pressed without needing that key to be pressed physically

  • I am also looking for this so I can use the platform behavior...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use a variable to store the state of each key you use and update them with keyboard and touch events. Then in the rest of your event just compare their value to see the state.

  • I'm with R0J0hound, just have it that if Space is pressed > Veriable = true, else false. You could then have if object A is touching Object B > variable = true, else false.

    Like this -

  • I'm afraid this isn't quite what I'm after... I'm looking for User Defined control. Something like this...

    Defining Control

    • user selects the option to customize controls
    • user selects the control "move left"
    • the system then waits for user input
    • the system returns a value for the first key the user presses
    • the system saves that value to the variable "moveLeft"
    • the system then saves that all to webstorage

    In Game Control

    • user presses a key
    • the system returns a value for the key pressed
    • the system compares that value to all the control variable values
    • if key pressed and the value of "moveLeft" are equal, then proceed...

    I've tried various ways of using both the Keyboard and Keycode plugins but I haven't got it working yet...

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