# Game Accuracy counter

**URL:** https://forum.kirupa.com/t/game-accuracy-counter/221694
**Category:** Uncategorized
**Created:** [April 6, 2007, 1:58pm UTC](https://forum.kirupa.com/t/game-accuracy-counter/221694 "2007-04-06T13:58:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![A\_R\_C\_A](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@A\_R\_C\_A](https://forum.kirupa.com/u/A_R_C_A)
#### Post date: [April 6, 2007, 1:58pm UTC](https://forum.kirupa.com/t/game-accuracy-counter/221694/1 "2007-04-06T13:58:49Z")

</div>

Hi!

I’m making a game, where i gun down a movieclip, i am counting the shots fired and the hits, now i want to show the accuracy in per cent. how do i do that this is what i have right now:  
i have three variables  
shots, hitCount and accu

function accuracy():Void  
{  
accu = Math.floor(Math.random() (shots % 100) \* (hitCount));  
acc.text = accu;  
}

acc is a label.

And also, how do i make my aim to show over my target and not behind?
