Count the number of objects/hits (accuracy system)

Get help using Construct 2

Post » Wed Feb 06, 2013 7:17 am

Hey guys,

Im 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


Image
Check out our start-up and configure your own helmet in true 3D.
B
42
S
11
G
11
Posts: 1,152
Reputation: 9,886

Post » Wed Feb 06, 2013 7:33 am

You could add variable 'Player1HitCount' and action 'add 1 to Player1HitCount' to your 'on collision' event.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Feb 06, 2013 7:46 am

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, its 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 doesnt shoot.

Any ideas? :)
Image
Check out our start-up and configure your own helmet in true 3D.
B
42
S
11
G
11
Posts: 1,152
Reputation: 9,886

Post » Wed Feb 06, 2013 7:50 am

[QUOTE=Beaverlicious] Sounds good, but

1.You can be hit by your own bullets
2.There are some obstacles that also spawn bullets/hurt you
[/QUOTE]

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 :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Feb 06, 2013 8:40 am

damned:) thats a pretty good idea! THX to my special guru vee41!

Ill try it when im at home! :)

Have a nice day!
Image
Check out our start-up and configure your own helmet in true 3D.
B
42
S
11
G
11
Posts: 1,152
Reputation: 9,886


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 25 guests