Scripts / How to add Hit Percentage HUD?

Author
Message
js
9
Years of Service
User Offline
Joined: 24th Sep 2015
Location:
Posted: 24th Sep 2015 19:21
How can i add a shot / hit percentage head up display (gui text) based from number of bullets that hit the target divided by number of bulled fired ?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Sep 2015 21:30
there's no default way to track ammo or number of shots taken so i'm afraid this isn't really possible (unless you can add a dummy object behind you target to catch any "misses"?
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
js
9
Years of Service
User Offline
Joined: 24th Sep 2015
Location:
Posted: 25th Sep 2015 06:03
thank you for your response smallg, how about if i add a score ? then divide that score with the difference of the ammo that i have used ? like for instance i have used 8 ammo from my 10 ammo from a single gun, and my score is 4, can you please teach me how can i add a score and divide that with 8? or the ammo that have been used by my character ??
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Sep 2015 10:34 Edited at: 25th Sep 2015 10:37
Like I said, you can't, there's no real way to track ammo used yet.
Best you can do is try a work around like i said above but I doubt it'll work for multiple guns (you can try with weaponid but in my experience it doesn't update quick enough so it'll likely sill miss count)

You don't really need maths for a score system though, just add points if the target loses health and subtract points if the "dummy background" (the miss catcher) loses health.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-12-22 07:34:26
Your offset time is: 2024-12-22 07:34:26