Count the number of objects/hits (accuracy system)

0 favourites
  • 5 posts
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • Hey guys,

    I?m thinking about adding an accuracy-statistic to my little multiplayer game.

    Is there any possibillity to count the number of objects and the hit rate:

    Player1 -> SpawnObject.Count

    ObjectsSpawnedByPlayer1 -> on collision with Player2.Count

    Player1 -> SpawnObject.Count

    ObjectsSpawnedByPlayer1 -> on collision with Player2.Count

    And then, i need to calculate the % of hits :)

    Is there any possibility, or am I just dreaming?

    Greets from the

    Beaver

  • You could add variable 'Player1HitCount' and action 'add 1 to Player1HitCount' to your 'on collision' event.

  • Sounds good, but

    1.You can be hit by your own bullets

    2.There are some obstacles that also spawn bullets/hurt you

    So I guess, it�s necessary to count the exact objects created by player or player2 and if they hit the enemy (add+1 to accuracy variable)

    I thought about counting clicks to get the number of bullets shot, but some of my weapons have delay time, so it would increase the rate even he doesn�t shoot.

    Any ideas? :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds good, but

    1.You can be hit by your own bullets

    2.There are some obstacles that also spawn bullets/hurt you

    Add a variable to the bullets that defines who shot the bullet, you can use that to compare whether you should increment the 'accuracy' variable :)

  • damned:) that�s a pretty good idea! THX to my special guru vee41!

    I�ll try it when i�m at home! :)

    Have a nice day!

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