Jump to content
kraxous

Reset Targets via Laptop

Recommended Posts

Hey gang,

 

So I'm using a GameLogic in my training centre that when the targets are shot, they remain down - fantastic! And they are able to be reset via 0, 0, 1 on the radio menu but this isn't how I want to do it. I'd like to be able to put these radio protocols onto the laptop and simply scroll click 'Reset'. So, my question is, how can I reset these targets via the laptop?

 

Cheers!

Share this post


Link to post
Share on other sites

If you name the targets then it's possible to do it through a simple script.  On the laptop you can put the code below in the init.

this addAction ["Reset", "resetTargets.sqf"];

then in "resetTargets.sqf" you can put:

target1 animate ["terc", 0];
target2 animate ["terc", 0];
target3 animate ["terc", 0];

(target1, target 2 and target 3 being the names of the targets)

 

 

 

Of course there are plenty of ways of doing this such as using eventHandlers, or variables or something of that sort but this is a pretty simple way of doing it.

Share this post


Link to post
Share on other sites

If you name the targets then it's possible to do it through a simple script.  On the laptop you can put the code below in the init.

this addAction ["Reset", "resetTargets.sqf"];

then in "resetTargets.sqf" you can put:

target1 animate ["terc", 0];
target2 animate ["terc", 0];
target3 animate ["terc", 0];

(target1, target 2 and target 3 being the names of the targets)

 

 

 

Of course there are plenty of ways of doing this such as using eventHandlers, or variables or something of that sort but this is a pretty simple way of doing it.

OK, awesome, thank you!

 

I'll give it a whirl. :)

Share this post


Link to post
Share on other sites

The targets still pop up after being hit in a few seconds. And the script can't work this way. It becomes useless because they pop up automatically, they don't stay down on the ground after the hit. Can you add anything else that could hold them on the ground after a hit? And can you add a second laptop with another script with a picture of a target on the screen showing where the bullet has hit? I saw that in the WS inside a template, but I don't know how to open the template and use it.

Share this post


Link to post
Share on other sites

you need a nopop statement somewhere.For example, you could add another action to the laptop such as "Start Range" or something. inside that actions code:

nopop=true

and then in your action to Reset the range, add:

nopop=false

There's other ways of doing it of course but that's just the easiest to implement IMO

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

×