Jump to content
arma_max

Trigger by Anybody present returns Agent in thisList on activation

Recommended Posts

Hi,

 

I have a trigger that is configured to trigger

 

- by Anybody

- when present

 

The onActivation says:

 

_handle = [thisTrigger, thisList] execVM "captureTown.sqf";

 

Script below:

diag_log format ["_this: %1", _this];

_tr = _this select 0;
_triggeredBy = _this select 1;
_timer = 0;


diag_log format ["_tr: %1", _tr];
diag_log format ["_triggeredBy: %1", _triggeredBy];

_triggeredBy = _triggeredBy select 0;

diag_log format ["_triggeredBy NEW: %1", _triggeredBy];

_sideTriggeredBy = side _triggeredBy;

diag_log format ["_sideTriggeredBy: %1", _sideTriggeredBy];

 

If I now run the game the trigger already fires even if there is no unit in the area. Looking at the log files it says:

 

16:32:44 "_this: [163964: <no shape>,[Agent 0x1e7cc080]]"
16:32:44 "_tr: 163964: <no shape>"
16:32:44 "_triggeredBy: [Agent 0x1e7cc080]"
16:32:44 "_triggeredBy NEW: Agent 0x1e7cc080"
16:32:44 "_sideTriggeredBy: CIV"

So the question is: who is this agent? Any animal or ... ?

 

And how would I have to fix it to make sure the trigger is only triggered by "real" units?

 

Max

Share this post


Link to post
Share on other sites

Try in Cond: "Any Player" instead of "Anybody". With Anybody objects counts...

Share this post


Link to post
Share on other sites

Kill the rabbits... enableEnvironment [false, true]   . It's better, so, for the CPU load.

  • Like 2

Share this post


Link to post
Share on other sites
On 7/15/2019 at 12:57 AM, TURCO_AR said:

Try in Cond: "Any Player" instead of "Anybody". With Anybody objects counts...

 

With that it is only triggering when the player is entering it but not other AI soldiers.

 

On 7/16/2019 at 2:52 AM, pierremgi said:

Kill the rabbits... enableEnvironment [false, true]   . It's better, so, for the CPU load.

 

But that in my init.sqf and it return an error that the number of parameters is wrong 😕

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

×