I have been trying to put together a prototype for airconsole, based on construct2 but I am having trouble in paradise. Using the "pong" game exemple, I started with this kind of thing to store every device ID : http://developers.airconsole.com/images/examples/construct2/example_event_sheet.png The problem I am having is that I receive, whenever the game is ready, all the controller joining under the same ID... the ID of the first controller. Even if the simulator only has 2 connected devices. I am really having a hard time figuring this out. I decided then to try to make my own custom airconsole.onConnect(). But I am failing to make it work properly to stock my controller IDs for some ready.. :(
airconsole.onConnect = function() {
var deviceID = airconsole.getDeviceId();
console.log(deviceID);
airconsole.message(AirConsole.SCREEN, {
"message": '{"c2dictionary":true,"data":{"controller_ID":' + deviceID + '}}'
});
};
Mostly because I dont know how to receive the message back :D. Does anyone has any clue as to what could happen here. Couldnt find anything...
Thanks a lot !