Jump to content
tinter

The Invisible Targets You Never Knew Existed And How They Could Be So Much Better

Recommended Posts

I apologize in advance if this isn't the right forum, I have trouble navigating when there are so many forums.

 

With this post I just want to talk about a feature that I didn't know existed, but I've needed and seen people need a lot.

The problem is when you want AI to shoot at something that isn't strictly an enemy unit. The go-to answer for this problem has usually been to use the targetting commands, and then fiddling with whichever command for firing that just happens to work.

But there is a much better solution that was in the game since alpha, removed and apparently added back in later and those are invisible targets.

_target = "O_TargetSoldier" createVehicle [0,0,0];
createVehicleCrew _target;  

This creates a unit that is invisible, ai will react to it and fire at it as if it was an enemy. This is so much better in so many situations than manually taking control of the AI with scripts and all the various firing commands. Once I saw this I wanted to tell the whole world about this wonderful feature. Sadly, this solution has it's own problems, and worst of all,  I believe many of these problems could be fixed rather easily.

 

To start off, you need to add a crew to this object. This seems excessive as there are already many units in the game and this object could've just been made into a normal unit, instead of a vehicle.This has also lead to a lot of people discovering this feature, trying it out and then concluding it must be bugged because they didn't realize they needed a crew.

 

Second of all, this object actually blocks bullets. If you put it in front of something you want the AI to target, they'll shoot at it, you get nice sparks, until they run out of ammo or you script the object to be deleted, but not much will happen with whatever's behind, since the object absorbs all bullets. Best you can hope for is that the ai misses a bit, so they bullets actually hit the target you intended. I'm not an expert on arma modding, but according to this page https://community.bistudio.com/wiki/Oxygen_2_-_Manual#FIRE_Geometry, this is actually a really simple fix.

 

Third of all, this object is hidden. The problem with this is of course that very few people actually realizes this exists, which is a crying shame when there are countless forum posts all asking the same question, how do I make the AI shoot at something? Don't take my word for it, look at all these posts (Some admittedly for Arma 2) where this feature could've been used(Although this is not saying it's the best solution in all cases):

https://forums.bohemia.net/forums/topic/176421-force-ai-to-shoot-at-a-spot/

https://forums.bohemia.net/forums/topic/203553-forcing-ai-to-shoot-help/

https://forums.bohemia.net/forums/topic/118773-make-ai-shot-at-a-training-target/

https://www.reddit.com/r/arma/comments/60rr2d/script_to_get_ai_to_shoot_down_range/

https://www.reddit.com/r/arma/comments/7m1ldy/how_to_get_ai_to_target_civilians/

https://steamcommunity.com/app/107410/discussions/18/1693785669846205227/

http://www.armaholic.com/forums.php?m=posts&q=35586

 

Last of all the problems I know, attaching this object to something can easily obscure it. This one I sadly don't know how to fix. To describe the problem though, trying to attach this to an object is finicky as you can easily end up putting it within the bounds of your intended target, which means the AI won't see the invisible target, as the visible target obscures it. This is actually a two part problem as this target is invisible and thus it's hard to even get an idea of what you're even working with. If there at least existed some documentation on it, you could try to make it workable for whatever you're doing at the moment.

 

Getting to my wishlist at this point, it would also be very helpful if the shape of the object wasn't a box, but maybe more like a little 1x1m plane, or maybe several sizes? But that's wishful thinking and I'd much rather it stays as is, as long as the above problems got fixed.

 

Now I originally found this through an addon that itself added invisible targets.

https://github.com/DerekSauer/Sauer_InvisibleTargets

The author claims that the addon is now obsolete and it led to much confusion and my (re)discovery of this object. However I'm doubting the claim that it is obsolete, as, while I haven't tested it myself, I could easily see it working out better than the vanilla alternative.

 

I could try to fix this myself, I imagine a model for an invisible target would be pretty simple. If I find a pocket of time I might release my own version. I do hope that Bohemia takes notice of this very needed but lacking feature, and I hope the community will really make use of it, as problematic as it is at the moment.  In short, for all mission makers and scripters, I hope you experiment with this and try to use this for things you couldn't make before.

  • Like 4

Share this post


Link to post
Share on other sites

nice

 

there is also 

 

"suppresstarget" object, but maybe it doesnt work as well as these targets

 

use "lineIntersectsSurfaces" to find the surface you want AI to engage and use "worldtomodel" and "attachto" to attach the target to that spot

 

heres a code block i used to use for stuff like this

 

https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/code/functions/fn_AIHandleUnit.sqf#L326-L336

 

its commented out but i cant remember why anymore :)

Share this post


Link to post
Share on other sites

I've found

ArtilleryTarget
ArtilleryTargetE
ArtilleryTargetW
SuppressTarget
PaperCar
FireSectorTarget

these classnames and no matter if they have crew or not, positive or negative rating, using createVehicle or createUnit, above ground or not, using the reveal command, will not have the AI shoot at them.

  • Like 1

Share this post


Link to post
Share on other sites

I've realized I can fix some of these problems with a mod like this

class CfgPatches
{
	class tint_targets
	{
		units[]={
      "B_TargetSoldier_tin",
      "O_TargetSoldier_tin",
      "I_TargetSoldier_tin"
    };
		weapons[]={};
		requiredVersion=1.0;
		requiredAddons[]=
		{
			"A3_Structures_F"
		};
	};
};
class CfgVehicles 
{
  class B_TargetSoldier;
  class O_TargetSoldier;
  class I_TargetSoldier;
  class B_TargetSoldier_tin: B_TargetSoldier 
  {
    model = "\A3\Structures_F\System\ClutterCutter_small_F.p3d";
    scope = 2;
  };
  class O_TargetSoldier_tin: O_TargetSoldier 
  {
    model = "\A3\Structures_F\System\ClutterCutter_small_F.p3d";
    scope = 2;
  };
  class I_TargetSoldier_tin: I_TargetSoldier 
  {
    model = "\A3\Structures_F\System\ClutterCutter_small_F.p3d";
    scope = 2;
  };
};

I would release this, but I would much rather prefer that BIS would implement these changes or similar themselves.

  • Like 2

Share this post


Link to post
Share on other sites

Cool finds. These targets would be superbly useful if they didn't block bullets and were super visible/threatening. A vehicle sized one that attracted vehicle munitions would be very useful as well, eg,. putting a vehicle target on a building to have AI destroy it with cannon and rockets. 

 

-k 

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

×