Jump to content
Sign in to follow this  
Fux911

how to reset a counter ?

Recommended Posts

Hello guys !

I tried a bit with a shooting range. I have used this code to script the counts of hits the player does while the exercise.

//====================Schuetzen Scheiben======================

_scheibe = _this select 0; //==Scheiben Auswahl==

if (kamera == 1) then

{

k = [_scheibe] execVM "kamera.sqf";

};

hits = hits + 1; //==Treffer hochzaehlen==

hint format["%1 Treffer", hits]; //==Treffer anzeigen==

sleep 3.05; //==Pause==

_scheibe animate["terc",1]; //==Scheibe hinlegen==

---------------------------------------------------------

Now I don't know how to do a reset for the hit counter.

I'd like to reset the counter under one of the following circumstances:

option 1: The player reloads his gun

or

option 2: The player hits all targets

or

option 3: The player has shot the full magazine

So if anyone could help me on this I would be very thankful !

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  

×