Jump to content
Sign in to follow this  
tpw

TPWC AI suppression system

Recommended Posts

Any plans to extend this to suppress the player? Right now the player has a very unfair advantage over AI - since the suppression effect with shaking hands kicks in only when the bullet lands within only 1m of the player. The game completely ignores passing bullets in that calculation.

here metalcraze, give this one a try. I too found it a bit unfair to the ai as well so I added this in. It is supposed to create sway based on skill of the player but it certainly isn't perfected yet. feedback is welcome. And I know alot of people don't like this kind of stuff so if it were to make it into the suppression mod it would be optional.

This is the line I added to get the sway

_unit setskill ["courage",_originalcourage*_originalcourage*_general-(_shots*(1-_general)*.003)]; 
		    if (_unit == player) then 
			{
			addcamshake [(0.55/((player skill "aimingaccuracy")+(player skill "general"))) ,((random 6) - ((_unit skill "general")+(_unit skill "courage"))) ,(2.5 - ((player skill "aimingaccuracy")+(_unit skill "courage")))];
			};	 

/* 
TPWC AI SUPPRESSION 

Authors: TPW & -Coulum- 
1.01 20120625
*/ 

//////////// 
//VARIABLES 
/////////// 

//Suppression mode. 1 = basic , 2 = light, 3 = full stance / skills modification    
tpwc_ai_sup_mode = 3;   

//Delay before suppression functions start. Allows time for other AI mods to set unit skills 
tpwc_ai_sup_sleep = 5; 

//Debugging. Will display red balls over any suppressed units. 0 = no debugging, 1 = debugging 
tpwc_ai_sup_debug = 1; 

//Bullet detection radius (m). Bullets must pass within this distance of unit to suppress them. If set much below 10m, bullets may not be detected 
tpwc_ai_sup_br = 10; 

//Bullet ignore radius (m). Bullets from a shooter closer than this will not suppress.  
tpwc_ai_sup_ir = 25; 

//Shot threshold. More shots than this will cause unit to drop/crawl 
tpwc_ai_sup_st = 5; 

//Startup hint. 0 = no hint, 1 = hint 
tpwc_ai_sup_hint = 1;  

//Pistol and SMG ammo to ignore. Add custom ammo (eg suppressed) or change to taste     
tpwc_ai_sup_mags =[ 
"30rnd_9x19_MP5",    
"30rnd_9x19_MP5SD",    
"15Rnd_9x19_M9",    
"15Rnd_9x19_M9SD",    
"7Rnd_45ACP_1911",    
"7Rnd_45ACP_1911",   
"8Rnd_9x18_Makarov",   
"8Rnd_9x18_MakarovSD",   
"64Rnd_9x19_Bizon",   
"64Rnd_9x19_SD_Bizon",   
"13Rnd_9mm_SLP",   
"17Rnd_9x19_glock17",   
"6Rnd_45ACP",   
"30Rnd_9x19_UZI",   
"30Rnd_9x19_UZI_SD" 
];   

////////// 
// SET UP 
////////// 

//Declare private variables 
private ["_stanceregain","_skillregain","_unit","_bc","_shots","_originalaccuracy","_originalshake","_originalcourage","_general","_ball","_skillset","_asr"];  

//Allow time for ASR AI skills to propagate 
sleep tpwc_ai_sup_sleep; 

//Start hint    
if (tpwc_ai_sup_hint == 1) then { 
0 = [] spawn {sleep 3; hintsilent "TPWC AI Suppress 1.01 Active"; sleep 3; hintsilent ""}; 
};    


////////////////// 
// MAIN FUNCTIONS  
//////////////////  

//Basic version 
tpwc_ai_sup_basic =     
{   
   {   
   if (alive _x) then    
       { 
       _unit = _x;      
       _stanceregain = _unit getvariable ["tpwc_stanceregain", -1];  

       if (_stanceregain == -1) then    
           {      
           _unit setvariable ["tpwc_stanceregain", diag_ticktime];  
           _unit addeventhandler ["fired",{tpwc_ai_sup_fired = _this select 0;tpwc_ai_sup_bullet = _this select 6}];   
           _ball = "Sign_sphere25cm_EP1" createvehicle getposatl _unit;_ball attachTo [_unit,[0,0,2]]; _unit setvariable ["tpwc_supball",_ball]; 
           };  

       if ( diag_ticktime >= _stanceregain) then    
           {  
           _ball = _unit getvariable "tpwc_supball"; _ball hideobject true;          
           _unit setvariable ["tpwc_supshots", 0];   
           _unit setunitpos "auto";  
		_unit setvariable ["tpwc_suppressedstance", 0]; 
           _unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];  
           };  

       if !(isnull tpwc_ai_sup_bullet) then    
           {   
           _bc = count ((getposatl _unit) nearobjects ["bulletbase",tpwc_ai_sup_br]);   
           if (_bc > 0) then    
               {  
               if ((tpwc_ai_sup_fired distance _unit) > tpwc_ai_sup_ir) then    
                   {   
                   _unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];   
                   _shots = _unit getvariable "tpwc_supshots";   
                   _unit setvariable ["tpwc_supshots", _shots + _bc];   
                   _shots = _unit getvariable "tpwc_supshots";  
                   _unit setunitpos "middle"; 
				_unit setvariable ["tpwc_suppressedstance", 1]; 
                   if (tpwc_ai_sup_debug == 1) then  
                       { 
                       _ball = _unit getvariable "tpwc_supball";_ball hideobject false; 
                       };             
                   if (_shots > tpwc_ai_sup_st) then   
                       {  
                       _unit setunitpos "down";  
                       };   
                   };   
               };   
           };   
       };    
   } foreach allunits;   
};   

//Lite version 
tpwc_ai_sup_ai_sup_lite =     
{    
   {   
   if (alive _x) then    
       { 
       _unit = _x;      
       _stanceregain = _unit getvariable ["tpwc_stanceregain", -1];  

       if (_stanceregain == -1) then    
           {      
           _unit setvariable ["tpwc_stanceregain", diag_ticktime];  
           _unit addeventhandler ["fired",{tpwc_ai_sup_fired = _this select 0;tpwc_ai_sup_mag = _this select 5; tpwc_ai_sup_bullet = _this select 6}];   
           _ball = "Sign_sphere25cm_EP1" createvehicle getposatl _unit;_ball attachTo [_unit,[0,0,2]]; _unit setvariable ["tpwc_supball",_ball]; 
           };  

       if ( diag_ticktime >= _stanceregain) then    
           {  
           _ball = _unit getvariable "tpwc_supball"; _ball hideobject true;              
           _unit setvariable ["tpwc_supshots", 0];   
           _unit setunitpos "auto";  
		_unit setvariable ["tpwc_suppressedstance", 0]; 
           _unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];  
           };  

       if !(isnull tpwc_ai_sup_bullet) then    
           {   
           _bc = count ((getposatl _unit) nearobjects ["bulletbase",tpwc_ai_sup_br]);   
           if (_bc > 0) then    
               {  
               if ((tpwc_ai_sup_fired distance _unit) > tpwc_ai_sup_ir) then    
                   {   
                   if !(tpwc_ai_sup_mag in tpwc_ai_sup_mags) then    
                       {  
                       _unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];   
                       _shots = _unit getvariable "tpwc_supshots";   
                       _unit setvariable ["tpwc_supshots", _shots + _bc];   
                       _unit setunitpos "middle"; 
					_unit setvariable ["tpwc_suppressedstance", 1]; 						
                       if ((side tpwc_ai_sup_fired != side _unit) && (vehicle _unit == _unit)) then    
                           { 
                           _shots = _unit getvariable "tpwc_supshots";  
                           if (tpwc_ai_sup_debug == 1) then  
                               { 
                               _ball = _unit getvariable "tpwc_supball";_ball hideobject false; 
                               }; 
                           if (_shots > tpwc_ai_sup_st) then   
                               {  
                               _unit setunitpos "down";  
                               };   
                           };    
                       };   
                   };   
               };   
           };   
       };    
   } foreach allunits;   
};   

tpwc_ai_sup_full =      
{     
   {    
   if (alive _x) then     
       {  
       _unit = _x;       
       _skillregain = _unit getvariable ["tpwc_skillregain", -1];     
       _stanceregain = _unit getvariable ["tpwc_stanceregain", -1];   

       if (_stanceregain == -1) then     
            { 
            _unit setvariable ["asr_ai_sys_aiskill_configured", false];  
            _unit setvariable ["tpwc_skillset", false];  
		 _unit setvariable ["tpwc_combatmode", "unchanged"]; 
           _unit setvariable ["tpwc_originalaccuracy", _unit skill "aimingaccuracy"];   
           _unit setvariable ["tpwc_originalshake",  _unit skill "aimingshake"];  
           _unit setvariable ["tpwc_originalcourage", _unit skill "courage"];   
           _unit setvariable ["tpwc_general", _unit skill "general"];  
           _unit setvariable ["tpwc_stanceregain", diag_ticktime];   
           _unit setvariable ["tpwc_skillregain", diag_ticktime];     
           _unit addeventhandler ["fired",{tpwc_ai_sup_fired = _this select 0;tpwc_ai_sup_mag = _this select 5; tpwc_ai_sup_bullet = _this select 6}];    
           _ball = "Sign_sphere25cm_EP1" createvehicle getposatl _unit;_ball attachTo [_unit,[0,0,2]]; _unit setvariable ["tpwc_supball",_ball];  
           };   

       if ( diag_ticktime >= _stanceregain) then     
           {   
           _ball = _unit getvariable "tpwc_supball"; _ball hideobject true;          
           _unit setvariable ["tpwc_supshots", 0];    
           _unit setunitpos "auto";   
		_originalcourage = _unit getvariable "tpwc_originalcourage";   
           _general = _unit getvariable "tpwc_general";
		_unit setvariable ["tpwc_suppressedstance", 0]; 			
           if((_unit skill "courage") < (_originalcourage - 0.1)) then    
               {    
               _unit setskill ["courage",(_unit skill "courage")+(_general)*(0.003)];     
               }   
               else  
               {  
			if (_unit getvariable "tpwc_combatmode" != "unchanged") then 
				{
				_unit setbehaviour str(_unit getvariable "tpwc_combatmode");
				_unit setvariable ["tpwc_combatmode", "unchanged"]; 
				};
			_unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];       
               };  
           };   

       if (diag_ticktime >= _skillregain) then    
           {  
           _originalaccuracy = _unit getvariable "tpwc_originalaccuracy";      
           _originalshake = _unit getvariable "tpwc_originalshake";               
           _originalcourage = _unit getvariable "tpwc_originalcourage";   
           _general = _unit getvariable "tpwc_general";         
           if((_unit skill "aimingaccuracy") < _originalaccuracy) then    
               {  
               _unit setskill ["aimingaccuracy",(_unit skill "aimingaccuracy")+((_originalaccuracy-(_unit skill "aimingaccuracy"))*.01)];     
               };   
           if((_unit skill "aimingshake") < _originalshake) then    
               {    
               _unit setskill ["aimingshake",(_unit skill "aimingshake")+((_originalshake-(_unit skill "aimingshake"))*.01)];    
               };  
           if (((_unit skill "aimingshake") > (_originalshake - 0.1)) && ((_unit skill "aimingaccuracy") > (_originalaccuracy - 0.1))) then   
               {  
               _unit setvariable ["tpwc_skillregain", diag_ticktime + 10];  
               }  
           };   

       if !(isnull tpwc_ai_sup_bullet) then     
           {    
           _bc = count ((getposatl _unit) nearobjects ["bulletbase",tpwc_ai_sup_br]);    
           if (_bc > 0) then     
               {   
               if ((tpwc_ai_sup_fired distance _unit) > tpwc_ai_sup_ir) then     
                   {    
                   if !(tpwc_ai_sup_mag in tpwc_ai_sup_mags) then     
                       {   
                       _unit setvariable ["tpwc_skillregain", diag_ticktime + (random 4)-((_unit getvariable "tpwc_general")+(_unit getvariable "tpwc_originalcourage"))];     
                       _unit setvariable ["tpwc_stanceregain", diag_ticktime + 10];    
                       _shots = _unit getvariable "tpwc_supshots";    
                       _unit setvariable ["tpwc_supshots", _shots + _bc];    
                       _unit setunitpos "middle";    
					_unit setvariable ["tpwc_suppressedstance", 1]; 	
                       if ((side tpwc_ai_sup_fired != side _unit) && (vehicle _unit == _unit)) then
						{
                           _unit setvariable ["tpwc_combatmode", behaviour _unit]; 
						_unit setbehaviour "COMBAT";	
                           _shots = _unit getvariable "tpwc_supshots";   
                           _originalaccuracy = _unit getvariable "tpwc_originalaccuracy";     
                           _originalshake = _unit getvariable "tpwc_originalshake";   
                           _originalcourage = _unit getvariable "tpwc_originalcourage";    
                           _general = _unit getvariable "tpwc_general";  
                           _unit setskill ["aimingaccuracy",_originalaccuracy*_originalcourage*_general-(_shots*(1-_general)*.003)];    
                           _unit setskill ["aimingshake",_originalshake*_originalcourage*_general-(_shots*(1-_general)*.003)];   
                           _unit setskill ["courage",_originalcourage*_originalcourage*_general-(_shots*(1-_general)*.003)]; 
		    if (_unit == player) then 
			{
			addcamshake [(0.55/((player skill "aimingaccuracy")+(player skill "general"))) ,((random 6) - ((_unit skill "general")+(_unit skill "courage"))) ,(2.5 - ((player skill "aimingaccuracy")+(_unit skill "courage")))];
			};	 
                           if (tpwc_ai_sup_debug == 1) then   
                               {  
                               _ball = _unit getvariable "tpwc_supball";_ball hideobject false;  
                               };                          
                           if (_shots > tpwc_ai_sup_st) then    
                               {   
                               _unit setunitpos "down";   
                               };    
                           };     
                       };    
                   };    
               };    
           };    
       };     
   } foreach allunits;    
};    

//If ASR AI has set unit skills, make these the "originals" for each unit  
tpwc_ai_sup_asrskills = 
{ 
sleep 3; 
while {true} do  
   { 
       { 
       _unit = _x; 
       _asr = _unit getVariable "asr_ai_sys_aiskill_configured"; 
       _skillset = _unit getVariable "tpwc_skillset"; 
       if ((_asr) && !(_skillset))then  
           { 
           _unit setvariable ["tpwc_originalaccuracy", _unit skill "aimingaccuracy"];   
           _unit setvariable ["tpwc_originalshake", _unit skill "aimingshake"];  
           _unit setvariable ["tpwc_originalcourage", _unit skill "courage"];   
           _unit setvariable ["tpwc_general",_unit skill "general"];  
           _unit setvariable ["tpwc_skillset", true]; 
           }; 
       } foreach allunits; 
   sleep 30; 
   }; 
};  

//CALL APPROPRIATE FUNCTION USING PER FRAME EVENTHANDLER 
if (tpwc_ai_sup_mode == 1) then  
   { 
   [tpwc_ai_sup_basic,0] call cba_fnc_addPerFrameHandler; 
   };   
if (tpwc_ai_sup_mode == 2) then  
   { 
   [tpwc_ai_sup_lite,0] call cba_fnc_addPerFrameHandler; 
   };  
if (tpwc_ai_sup_mode == 3) then  
   {
//Spawn ASR_AI skill set loop if running ASR_AI > 1.15.1 	
   if (isclass (configfile >> "cfgPatches">>"asr_ai_sys_aiskill")) then  
       { 
	_asr_ai_va = getArray (configfile>>"cfgPatches">>"asr_ai_main">>"versionAr");
	if (_asr_ai_va select 0 >= 1 && _asr_ai_va select 1 >= 15 && _asr_ai_va select 2 >= 1) then 
		{
		[] spawn tpwc_ai_sup_asrskills; 
		};	
	}; 
   [tpwc_ai_sup_full,0] call cba_fnc_addPerFrameHandler;  
   }; 

Its really just a low intensity dose of cam shake but it does the trick, and I don't believe there is any other easy way of creating weapon sway. It should be much more noticeable when playing a untrained unit and barely noticeable when playing a special ops guy or what not. It would be great if I had some advice on how to properly balance it.

So will AI who are out of combat react to sonic cracks the same way they react to nearby impacts now? Ie, will bullets overhead cause them to enter combat mode and search for the shooter?

almost. When a shot passes by the ai will go into danger mode and will change stance appropriately. They will not be given any info on the shooter however.

Download COSLX and grab this file, player will be suppressed by Ai with this.

SLX_Suppression_Effects.pbo

Hi Gunter, I tried out that pbo. What exactly are the suppression effects. I honestly didn't find any difference and couldn't find anything in the pbo so far.

Edited by -Coulum-

Share this post


Link to post
Share on other sites

almost. When a shot passes by the ai will go into danger mode and will change stance appropriately. They will not be given any info on the shooter however.

Roger. So long as they are able to connect the muzzle blast (if audible) to the fired shot, then AFAIK the result should be the same as an impact.

Share this post


Link to post
Share on other sites
Hi Gunter, I tried out that pbo. What exactly are the suppression effects. I honestly didn't find any difference and couldn't find anything in the pbo so far.

Sorry about that I forgot to mention you need another file that it is dependent on, but basically what it does is

When you get shot at the screen will slightly change, your aim will shake a bit, and your player character will breath heavier for a bit.

If I remember correctly I think it effects the AI too, i forget its been a while since I played.

But it needs SLX_NetCode.pbo to run.

Share this post


Link to post
Share on other sites
Sorry about that I forgot to mention you need another file that it is dependent on, but basically what it does is

When you get shot at the screen will slightly change, your aim will shake a bit, and your player character will breath heavier for a bit.

If I remember correctly I think it effects the AI too, i forget its been a while since I played.

But it needs SLX_NetCode.pbo to run.

Okay thanks. I'll give it a rip tomorrow and try to dig deeper into the pbo.

Share this post


Link to post
Share on other sites

Hello to all,

wwwoooowwww...it´s an hourly progressive development.

Thanks for the new update.

As i said before: both of you, tpw and Coulum - you are hotshots!

Great to see the close collaboration of all who are involved in this process, it´s fantastic to read all the helpful posts!

Günter, i pity you, hope you can release before turn of the year, hehe...;)

Thanks to all of you.

Cheers

McLupo

Edited by McLupo

Share this post


Link to post
Share on other sites

Another great effect of this mod - remember how often you encountered stuff where you were in combat your team mates would often run through your line of fire and sometimes get shot. Now when I fire and they run there - they quickly drop to the ground and crawl under my (and each other's) bullets and get up when it's safe to do so.

Share this post


Link to post
Share on other sites
Hi all.

I've updated the first post with release version 1.01 (addon and script). Huge thanks to Robalo for helping integrate TPWC and ASR_AI.

@metalcraze - the script currently doesn't actually exclude the player from suppressive skill reduction, but does not apply any physical hints such as shaking. I will look into this.

@Robalo - the 1.15.2 aiskill pbo seems to allow TPWCAS stance changes to be applied more consistently, but that might just be expectation bias! Massive thanks for that.

Thanks for your diligence. It's great to see the community work so effectively (lot of hard work in such a short space of time). I honestly believe that this mod and Robalo's ASR AI have done more to change the gaming experience than any other mod.

But where can I find 1.15.2 aiskill pbo? I looked in the ASR AI thread but found no mention of it ... ?

Also does anyone know is this mod is compatible with i44?

Edited by domokun

Share this post


Link to post
Share on other sites
Thanks for your diligence. It's great to see the community work so effectively (lot of hard work in such a short space of time). I honestly believe that this mod and Robalo's ASR AI have done more to change the gaming experience than any other mod.

But where can I find 1.15.2 aiskill pbo? I looked in the ASR AI thread but found no mention of it ... ?

Also does anyone know is this mod is compatible with i44?

Gday Domokun

Thanks for the very high praise! Robalo is the true master though, he's probably forgotten more about scripting than I'll ever learn.

1.15.2: http://ge.tt/4WqzCaJ/v/0?c

No idea about i44, I can't see why it wouldn't work unless they have changed the way mods are allowed to run.

Share this post


Link to post
Share on other sites

Ref: danger.FSM

http://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_AI_FSM

http://community.bistudio.com/wiki/Arma_2:_FSM_Danger_Causes

DCExplosion (4)

Ammo impact (explosion or a bullet hit) detected (seen or heard).

The main benefit could be speed/less performance impact here as the events are generated by the engine.

This means they are already present and are done very efficiently.

Share this post


Link to post
Share on other sites

Guys, forgive me for asking this if it's been asked before, so this mod now is compatible and working with Robalo's ASR AI mod?

Share this post


Link to post
Share on other sites
Guys, forgive me for asking this if it's been asked before, so this mod now is compatible and working with Robalo's ASR AI mod?

Yes it is. We worked with Robalo to make sure that TPWCAS didn't interfere with the skills assigned by ASR_AI. I'm 99% certain your computer won't catch fire if you run the 2 mods together.

Share this post


Link to post
Share on other sites
Yes it is. We worked with Robalo to make sure that TPWCAS didn't interfere with the skills assigned by ASR_AI. I'm 99% certain your computer won't catch fire if you run the 2 mods together.

Great to know, if it's catching fire it's most likely my wife burning it down for overplaying this awesome game. :D

Share this post


Link to post
Share on other sites
Ref: danger.FSM

http://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_AI_FSM

http://community.bistudio.com/wiki/Arma_2:_FSM_Danger_Causes

The main benefit could be speed/less performance impact here as the events are generated by the engine.

This means they are already present and are done very efficiently.

Yeah, but as it's been said already, the main difference is that danger.fsm doesn't take into account the bullets that don't impact near the unit.

Share this post


Link to post
Share on other sites
Ref: danger.FSM

http://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_AI_FSM

http://community.bistudio.com/wiki/Arma_2:_FSM_Danger_Causes

The main benefit could be speed/less performance impact here as the events are generated by the engine.

This means they are already present and are done very efficiently.

Thanks for that PVP. I'm pretty sure ASR_AI is already hooking into these (Robalo might pipe up here). But, as already stated, the primary aim of this mod is to simulate AI reaction to the sonic crack of a passing projectile, not the visual/noise of an impacting projectile[/i].

I am very mindful of the performance penalty, and am currently doing a major overhaul of the code to move all the non time critical stuff out of the PFEH loop. All the per frame loop now does is detect bullets, establish the degree of suppression they are causing each unit, and set an appropriate variable for the unit. A non time critical 2 second loop then handles all the calculations and variable wrangling for stance/skill and behaviour changes based on the variable. This approach is looking very encouraging and I'm certainly able to have far more units on a map shooting each other without framerate drops or lag.

---------- Post added at 20:05 ---------- Previous post was at 19:47 ----------

Great to know, if it's catching fire it's most likely my wife burning it down for overplaying this awesome game. :D

Yes...

My Arma playing went through the roof once I separated from mine.

Share this post


Link to post
Share on other sites

Does this mod work with i44 too?

Share this post


Link to post
Share on other sites

No idea mate, I don't own it:) Can you try it out for us?

Does this mod work with i44 too?

Share this post


Link to post
Share on other sites

I44 is the mod. IF is the one you purchase.

There should be no reason that this script doesnt work with I44.

Share this post


Link to post
Share on other sites
Download COSLX and grab this file, player will be suppressed by Ai with this.

SLX_Suppression_Effects.pbo

Does not affect the player in any way. Bullets pass by, land close - no effect.

Unless ASR AI+TPWC Suppression disable something - it does nothing.

The more I fight with TPWC the more I realize how much player suppression is needed. TPWC atm makes humans gods.

Share this post


Link to post
Share on other sites

Make sure you have the netcode pbo for SLX or the SLX suppression won't work.

Assuming you do have it actually working and are not seeing suppression, that's not due to TPWCAS. I went over SLX suppression with an electron microscope, they don't clash.

We are working on player suppression via addcamerashake (ie if the player is suppressed the camera shakes slightly to simulate trembling/increased heart rate etc). Testing it out, it certainly makes it harder to get a bead on an enemy when you're shaking like a dog shitting peach pips. We could throw in breathing changes and some post processing too. But as -coulum- mentioned, it has to be a selectable option, because some people play arma to feel like a god.

Does not affect the player in any way. Bullets pass by, land close - no effect.

Unless ASR AI+TPWC Suppression disable something - it does nothing.

The more I fight with TPWC the more I realize how much player suppression is needed. TPWC atm makes humans gods.

Share this post


Link to post
Share on other sites

Its been a while since I've tested with danger.FSM. However it may also react/list passing bullets. Worth looking into IMO.

The general question is why/if you really need to use a PFEH.

From what I understand you "only" want to know if a bullet passed an unit inside a given distance.

Another possible approach could be to use firedEH and cache the bullet vectors.

And do less frequent checks per unit, if a vector gets close (enough).

Share this post


Link to post
Share on other sites

There's also this addon here. If you don't want to use SLX suppression for the moment.

Share this post


Link to post
Share on other sites

I appreciate what you're trying to say but I'm not going to keep apologising for using a bloody PFEH.

If you think the system is shit, don't use it. Or write something better. If I get a torrent of complaints about the performance of this mod, I will too.

Its been a while since I've tested with danger.FSM. However it may also react/list passing bullets. Worth looking into IMO.

The general question is why/if you really need to use a PFEH.

From what I understand you "only" want to know if a bullet passed an unit inside a given distance.

Another possible approach could be to use firedEH and cache the bullet vectors.

And do less frequent checks per unit, if a vector gets close (enough).

Share this post


Link to post
Share on other sites
Gday Domokun

Thanks for the very high praise! Robalo is the true master though, he's probably forgotten more about scripting than I'll ever learn.

1.15.2: http://ge.tt/4WqzCaJ/v/0?c

No way, but thanks for making me smile with the whole face :D I learned a lot about scripting from the best modding gang which is the ACE team, but there's still so much ...

The link above provides the only addon that changed since ASR_AI v1.15.1, will probably make an official 1.15.2 update soon.

---------- Post added at 15:55 ---------- Previous post was at 15:49 ----------

Thanks for that PVP. I'm pretty sure ASR_AI is already hooking into these (Robalo might pipe up here).

I did not even scratch that danger fsm yet, but was planning to, esp. to see if the AI can be made to react to spawned ammo (magic arty ?). Hope to have a look at it soon.

Share this post


Link to post
Share on other sites

Had a bad day tpw? If you dont appreciate input, best just to ignore it.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×