megga's Forum Posts

  • 10 posts
  • You need to use the on message key condition in Construct 2 to capture these events, as I said before already. The packet will come in a form of a c2 dictionary which you will need to read and act as needed for your game. For more infos, read my second tutorial about airconsole expressions

    why not come to the message?

  • That's basic jquery... # is a id selector, . is a class selector. You don't need to write anything if you use the controller generator, generate, export, follow instructions, and just do the construct 2 side

    I tried to learn but then the question is why isn't it working for me or what am I doing wrong?

    I generated controller instructions.

  • Then you'll need to read again, the screen shots can't be better explained sorry.

    https://developers.airconsole.com/#!/guides/construct2

    I read and reread it.

    I very rarely ask for help on the forum only as a last resort,yesterday I spent about 6 hours trying to figure out how it works.

    in the example is <button id="up">MOVE UP</button>

    is the code that sends the message

    $("#up").on('touchstart', function () {

    airconsole.message(AirConsole.SCREEN {

    message: 'up'

    });

    });

    I understand that $("#up") is button id="up"

    but if I have <div class="dpad-dpad arrow-arrow-up"></div>

    I should write so ?

    $("#dpad-dpad arrow-arrow-up").on('touchstart', function () {

    airconsole.message(AirConsole.SCREEN {

    message: 'up'

    });

    });

  • Good. This teaches the bases. Then you download the pong exemple, with the the capx and you will learn how the controllers talk to the game

    I understand how the code works in c2

    I don't understand how to create your controller.

  • I said in Construct 2

    Quick question, did you read my tutorials?

    i read it :

  • You use On Message Key in Construct 2 to capture the generated controller messages

    and I have to write the function in the generated controller.html ?

  • I don't understand what you want.... Of course there's no difference, the official repo does take the changes from mine......

    I'm sorry, I translate through an interpreter.

    I have a code generated in airconsole-controller-generator.

    I don't understand how can I get a moment when it is pressed for example

    <div class="dpad-dpad arrow-arrow-up"></div>

    And I don't understand how can I convey this in c2

  • this link ?

    github.com/Psychokiller1888/airconsole-construct2/tree/UpdatingExemple/example_project

    I didn't notice a big difference

  • I have tried to use the controller generator,but I don't know how to write the function to pass values in c2.

    in the example of pong is simple-you have

    <button id="up">UP</button>

    and there is a function which is passed the value in c2

    $("#up").on(down_event, function () {

    air_console.message(AirConsole.SCREEN {

    message: 'up'

    });

    in controller generator:

    <div class="dpad-arrow dpad-arrow-up"></div>

    my problem is that I do not know how to write functions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,anyone can help me? I don't know how to make d-pad control.

    I figured out how it works:

    $("#up").on(down_event, function () {

    air_console.message(AirConsole.SCREEN, {

    message: 'up'

    });

    });

    Yes, I read the forum and seen that it is possible to transmit information using json, I can't understand how this works, can someone throw an example with capx and controller.html ?

  • 10 posts