Jump to content

Controlling Pop up Targets and Counting Accuracy

Recommended Posts

After hours of googling, scanning the forums and steam, I could not for the life of me find what I was looking for. So help would be greatly appreciated.


I am trying to make a rifle range with targets at certain ranges.  I would like to be able to raise targets at a certain distance, then drop them after it is done, raise the next distance, so on. The targets used are the red pop-up (small) targets from CUP.  In fact, is there a way to prevent the targets from going down after being shot?

I found the nopop=true script, but that just makes them stay down.  I guess this could be used on a controller to make them stay down after the stage is done, but I guess I would have to assign it to the set of targets.  I am not quite sure how to do that.


On a pistol range, I have stationary targets at a certain distance.

I would like to be able to give points based on where the target is hit and have them be counted at the end.


On both of these ranges, I would like to separately count the points to be displayed at the end:

Rifle Range: Count hits

Pistol Range: count points


If anything is unclear, please let me know.

Share this post

Link to post
Share on other sites
// disabe automatic target popup globally
nopop = true;

// popup target manualy (0 - up, 1 - down)
_target animate["terc", 0];

// check target popup state (0 - up, 1 - down)
private _state = _target animationPhase "Terc";

// target individual settings [DEV. VERSION ONLY!]
_target setVariable ["nopop", true];
_target setVariable ["popDelay", 10];

// handle target hit event
_target addEventHandler ["Hit", {
	systemChat format ["Target %1 hit by unit %2", _this select 0, _this select 1]}];


Did we not have the same thread just recently?

Share this post

Link to post
Share on other sites

As Serena mentioned, those commands will help control individual targets.


As for calculating accuracy, if the targets your using have selection support in the hitpart event, you can easily determine if the shot was accurate. Otherwise do what bis did in the COF - create gamelogics and attach them to the target spots, then on hitpart you can compare the hit position distance to the game logic.

Share this post

Link to post
Share on other sites

serena, I would like the targets to stay UP rather than down.  I'll look over the script in the morning and see if it works.

Share this post

Link to post
Share on other sites

Alright, got some time to try the scripts.
From looking at this and the other topic you quoted, I have been able to use a laptop to raise and lower the targets at the specified distance.  Thank you.


However, the nopop = true; keeps the targets down, where as I would like them to stay up.  Having the targets pop up after each hit is at least currently functional for our purposes though.  


The last bit of your script with the percentages, is there a way to save it as a number out of another number? i.e: 10/30?


As far as the hit distance, I am very new to that. I'll do some looking but I am looking for:

  • How to attach the logics
  • What scripts to use in the logics themselves
  • How to count/save the points for the targets

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