Jump to content
Sign in to follow this  
mp82

Detect the number of kills

Recommended Posts

Is there any way to detect how many units the player has killed?

If yes how can I do this?

Share this post


Link to post
Share on other sites

I think it's possible. In MP you can see numbers of destroyed unit and both in MP and SP you can see statistic in debriefing.

But I don't know how to detect it. Maybe there is some reserved variable for it. confused.gif

Share this post


Link to post
Share on other sites

it can be done but it needs work. here's what you do:

set all enemy units (soldiers or whatever) into named groups. Use the "count" command for each group and add the results to get the total number of the enemy units on the map.

Then use another script that activates each time you fire your weapon ("countammo" I think does that). In that script use the "count" command again and compare it with the original number that represent the total of enemy units .If the new number is smaller tell the script to add 1 to another variable that represents your kills and then print it on the script.

?(original_number < new_number) : personal_kills_variable=personal_kills_variable + 1

remember to equalize the values afterwards, because you'll always be adding 1 to your kill variable (original_number == new_number).

try it out and let me know if it works, or if you need clarification  biggrin.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×