Home   Help Search Login Register  

Author Topic: setCaptive bug  (Read 3457 times)

0 Members and 1 Guest are viewing this topic.

Offline Ext3rmin4tor

  • Members
  • *
setCaptive bug
« on: 01 Jul 2011, 17:24:50 »
I'm opening this post because I'm convertin an ArmA mission into ArmA 2 for caa1 and I had no issue at all in the previous game.

I have this mission were you are an agent under cover. There are restricted areas around the map where, if you walk in, you blew your cover. The agent has a "captive" status, and when the cover is blown for any reaon, his "captive" status changes into "false". I read in the Biki that there is a bug that causes an AI unit not to fire an enemy unit which changes its captive status from captive to non-captive. So I' vetried the following workaround without success:

1. Instead of using captive mode, I created two different groups, one for "west", which is enemy to the resistance and represents the blown cover, so you become an enemy at all effects, and one for west, which represents the low profile status.

2. When you blow your cover, you switch to the western group.

3. While you are in the west group I force all the enemies which has you as a target within 50 meters to aim and fire at you with doTarget and doFire, but they still don't attack you, and this is trange because those commands should work even if you tell the unit to fire at a friendly unit.

The problem is that the AI still doesn't shoot the enemy. The guys who never saw you before shoot you properly, but those who have already seen you don't, according to the bug.

Does anybody of you know something to make the AI fire properly?

EDIT: I discovered that they need some time (like 30 seconds or so) to "understand" that you are an enemy. My new question is now how you make them react faster.
« Last Edit: 01 Jul 2011, 17:27:37 by Ext3rmin4tor »
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline F2kSel

  • Members
  • *
Re: setCaptive bug
« Reply #1 on: 01 Jul 2011, 19:03:58 »
agentname setcaptive false  gave me about a 5 second delay

agentname setcaptive false; enemyname dofire agentname    is around 1 second delay


Better than naming all units  just place a trigger over the area where some units are to open fire on the agent
Set up like this


OPFOR PRESENT
condition   this and triggeractivated trig1
On act      {_x dofire agentname} foreach thislist

Name the trigger that sets agentname  setcaptive false  to trig1

I've tested it and it works well in Arma2 and OA.




Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: setCaptive bug
« Reply #2 on: 01 Jul 2011, 19:07:26 »
Reveal certainly works in OFP for situations where the AI needs a nudge to recognise stuff like freshly spawned vehicles etc. May work for Arma too.

Use F2kSel's trigger idea (could be the old whole-island trigger trick) to avoid having to name each loon.

Offline F2kSel

  • Members
  • *
Re: setCaptive bug
« Reply #3 on: 01 Jul 2011, 19:29:35 »
Looks like it was fixed some time back.

 [76664]  Fixed: SetCaptive doesn't stop AI shooting at a unit/player

Offline Ext3rmin4tor

  • Members
  • *
Re: setCaptive bug
« Reply #4 on: 02 Jul 2011, 18:06:02 »
Looks like they didn't fix it at all since I have the latest version  :D. The problem is not they don't shoot at the agent, but that it takes ages to acquire him as an enemy.

Anyway I tried with setFriendly and it appears they have a slightly faster reaction time.
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline Zipper5

  • BIS Team
  • ****
Re: setCaptive bug
« Reply #5 on: 02 Jul 2011, 19:10:14 »
Just tested it and this seems to work all the time:
Code: [Select]
_captive = _this select 0;
_executioner = _this select 1;

_captive setCaptive true;

sleep 5;

_captive setCaptive false;

_executioner setBehaviour "COMBAT";
_executioner reveal _captive;
_executioner doTarget _captive;
« Last Edit: 02 Jul 2011, 19:12:27 by Zipper5 »