How do I make a kill and death counter with Firebase and Photon?

0 favourites
  • 5 posts
From the Asset Store
Kill The Zombies
$23.40 USD
40% off
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported
  • Hey guys, I'm programming a battle royale and I would like to know how to record how many kills I've done and how many times I've died. Maybe instead of deaths I could count how many games I've played. But for a kill count I am not pretty sure. Ill add a screenshot of the code I've done so you may understand better (havent included Firebase yet) Could you guys explain me how, after the game, I could transfer the data to my Firebase? Thanks

  • create a number variable to track your kills, so basically for every enemy killed add 1 to "Kills" number variable, you can use the same logic to track your deaths, then if you want to display this in the game create a text object and set it to display the "Kills" number variable every tick, now it will display your kills where ever you place the kill tracking text object in your game.

    I'm not too well knowledgeable on saving data in Construct, but from what I understand you can use Local Storage object to save data from game to game, you can read more about it here;

    scirra.com/tutorials/526/how-to-make-savegames

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, but the game is for more than 2 players, so if there are 20 players focusing on killing 1 I wont know who killed that guy. That is what I was looking for. Btw, thanks! Ill check it out.

  • not exactly sure if this would work but in theory maybe you could just assign the same thing to each player, so there is a kill tracker for every entered player. so maybe if four people join the game it registers 4/20 players and tracks each?

  • Yeah, but the game is for more than 2 players, so if there are 20 players focusing on killing 1 I wont know who killed that guy. That is what I was looking for. Btw, thanks! Ill check it out.

    take a look at the multiplayer example construct has it is a battle royal type of multiplayer game, the host is a priority, and the guest code applies to each other player individually.

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