How do I link multiplayer with Firebase?

Get help using Construct 2

Post » Wed Jul 27, 2016 8:56 am

rexrainbow wrote:Action in event 3 is sending message only, it will trigger event 4 to display received message.
Designer does not need to display message in event 3, because event 4 in sender will also be triggered. It is different from official MP, which the sender will not receive his message.


I am not completely sure what do you mean. If you are referring to second action in the 3rd event:
Set Text to Test_Message.Text

That was a debug action I already removed where it sets a different text box from the chat box (a debug text box) to confirm that this event actually runs and that the problem is Firebase related not my C2 logic.

Right now what I have is the same exact as what you see but all the "Test_T" lines with Set text to are all removed (they are only debug ones).

Problem is, even if the sending should trigger receiving, that doesn't happen. Am I doing something wrong? I even went to the Firebase database and found NOTHING in it. The messages aren't added to the database at all.

Image
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Jul 27, 2016 9:14 am

I have no idea why it does not work, you might provide a very simple test capx to me to debug it.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Wed Jul 27, 2016 9:16 am

rexrainbow wrote:I have no idea why it does not work, you might provide a very simple test capx to me to debug it.


Sorry to be a bother and thanks a lot for your help. Here is the CAPX:
https://www.dropbox.com/s/9hsbwo5akhlve ... .capx?dl=0
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Jul 27, 2016 9:31 am

I could log the received message in console log. It is worked. And you can see the message data in dashboard before you close the app web page.
Here is the minimum capx of simplemessage plugin.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Wed Jul 27, 2016 10:26 am

rexrainbow wrote:I could log the received message in console log. It is worked. And you can see the message data in dashboard before you close the app web page.
Here is the minimum capx of simplemessage plugin.


When you say you saw the message in the console log is that in my CAPX? If so, do you have any idea why it isn't displaying the chat box?

I tried your CAPX out and it produced an error as there is no API Key in the Firebase V3 for Firebase. So what I did is that I replaced all the information in the Authentication with my own project (API Key, Server Key, Storage Key, etc...) and tried to run the app. It ran, but still whenever I type anything it doesn't show up in the chat box. Would it be a problem with my Firebase?
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Jul 27, 2016 1:46 pm

@Vallar

Overwrite properties (API Key, Server Key, Storage Key,...) in rex_firebase_apiv3 by yours.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Wed Jul 27, 2016 3:24 pm

@rexrainbow

That is exactly what I did with your example, I changed everything with my own stuff and it didn't work.
B
19
S
7
Posts: 161
Reputation: 1,751

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests