Jump to content
Sign in to follow this  
braveblades

Tagging enemy

Recommended Posts

Hi, one question about scripting - is it a possible to tag enemies using rangefinder or binocular?

I'd like to build a recon mission where player:

1) must locate & identify groups of enemy soldiers or vehicles then

2) tag EVERY enemy with unique ID (one-by-one; ID may increase automaticly) and

3) "transmit" this data by radio to HQ

4) and finaly - this data turn (automaticly?) into a list of mission goals for "strike team" to eliminate

5) OPTIONAL: It would be ideal if you can store this ID corelated with map coordinates - for use them to indicate precisely targets for "strike team"

...and if this a possible - what is the best approach to this case?

Thanks!

Share this post


Link to post
Share on other sites

you can use knowsAbout to determine if the player has detected a unit

if (player knowsAbout _target1 > 1.5)

later add it to some sort of list

targetArray set [count targetArray, _target1]; // targetArray must be initialized first (ie. targetArray = [];) otherwise set will error

im not sure what you want to send to HQ, since it probably wouldn't care what the data is

however you can afterwards create a function that will take all the data in the targetArray and create tasks for it

for [{_i = 0}, {_i < count targetArray}, {_i = _i + 1}] do
{
  _task = strikeTeamPlayer createSimpleTask [format ["task_%1", _i]]; // each task has to have unique id, other wise same task gets overwritten
  if (_x isKindOf "Man") then
  {
      _task setSimpleTaskDescription ["Eliminate the infantry", "Eliminate Infantry", ""];
  };
  if (_x isKindOf "Tank") then
  {
      _task setSimpleTaskDescription ["Destroy the tank in the area", "Eliminate Armor", ""];
  };
  _task setTaskState "Created";
} foreach targetArray;

this is all very rough and not tested, but that is one way you could organize your logic to make this work.

I suggest these wiki pages for more information

https://community.bistudio.com/wiki/knowsAbout

https://community.bistudio.com/wiki/Tasks

https://community.bistudio.com/wiki/Notification - this one shows how to setup task popups

Share this post


Link to post
Share on other sites

1. Done like any other mission, not special.

2. I suggest the use of cursorTarget and the detection of a key press or use of a radio trigger in order to activate a script that calls on that cursorTarget, getting their position, and placing a marker on their position. Can create a loop that refreshes in order to keep tabs on the unit.

3. Strictly cosmetic, and thus up to you.

4. Simply create tasks, with the objective position being the position of the marker or target. Make succeeded when !alive target.

5. To do this, instead of making a marker, just compile the coordinates into an array and do with it as you please. Coming from a SAR background, this is how I like it. Realism is what's up.

If you do not understand something I mentioned, I encourage you to search it first, as my layout is pretty simple.

Edit: Ninja'd by Igneous. Not to put him down, but knowsAbout does not provide a specific target, while cursorTarget does. As well, those task commands are obsolete. Look into the functions for tasks, new to A3. Google it. Hell, google "grimes task functions" and you'll probably find one of my many posts describing why the A2 task commands are obsolete, given the A3 functions.

Share this post


Link to post
Share on other sites

Thanks Igneous01 and Grimes. I'll try.

Btw - do you know is there a mission similar to my idea?

Edited by braveblades

Share this post


Link to post
Share on other sites

I think knowsAbout command kinda broken. At least for players. You can stand behind an enemy and your knowsAbout would be 0.

Share this post


Link to post
Share on other sites

Apparently to increase player's knowsAbout value you have to tap "reveal" button. It will increase knowsAbout accroding to the visibility and zoom and all that stuff.

AIs tap "reveal" button automaticly so if they see enemy they know about it too.

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  

×