Page MenuHomeFeedback Tracker

Detected By triggers activate after timeout even if all detecting units are dead
New, WishlistPublic

Description

A detected by trigger with a timeout will fire at the end of the timeout even if all the detecting units are dead.

This makes it extremely convoluted to make, for example, an alarm system where the player can, after being detected, quickly and silently kill his detectors to avoid an alarm going off.

Details

Legacy ID
2933086099
Severity
None
Resolution
Open
Reproducibility
Always
Category
Editor
Steps To Reproduce

In the editor:

  1. Place a BLUFOR player unit in editor.
  2. Place an INDEPENDENT AI next to and facing the player.
  3. Place a trigger with activation BLUFOR detected by independent, a timeout of 10s, and an onAct of: hint "YOU ARE DETECTED!";
  4. Preview the mission, killing the independent.
  5. Observe as the hint "YOU ARE DETECTED!" pops up after the timeout, even though all detecting units are dead.
Additional Information

I assume the reason for this behaviour is the detecting unit's knowsAbout-value not being reset to 0 when the unit dies.

Event Timeline

Sniper_Party edited Additional Information. (Show Details)
Sniper_Party set Category to Editor.
Sniper_Party set Reproducibility to Always.
Sniper_Party set Severity to None.
Sniper_Party set Resolution to Open.
Sniper_Party set Legacy ID to 2933086099.May 7 2016, 3:29 PM

Was googling for a solution to this problem. Glad to see its a bug, and not me being too stupid :)

Can confirm this behaviour. Have to find a scripted solution then...

ceeeb added a comment.Feb 8 2014, 11:59 AM

As a simple workaround, place a second trigger covering the same area, activated by the detecting side being present. Then in your original detected by trigger, use a condition like:
this and (count list secondTriggerName > 0)

@ceeeb: That works for single groups of enemies, but if you have a large area with multiple groups of enemies, then you would need to kill all of them once you have been spotted by just a single one. But thanks for suggestion!

I don't think this is a bug. But there is a simple workaround. Instead of detected by trigger create a normal trigger

Timeout : 10, 10 ,10
Type: NONE
Activation : independent
activation: once
Present
condition: {_x knowsAbout player > 0} count thisList > 0
on act: hint "you failed"

this will only activate if you have been spotted by any of the independent units who are inside trigger area

This is not a bug.

@Killzone_Kid: Thank you very much, that seems to work!

@MulleDK19: Why is this not a bug?

its not a bug because just prior to killing the independent, he has detected you activating the trigger - you are now known to independent side, so condition remains true through the timeout

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

Hm, if it's not a bug then it's at least not a good feature. You can achieve this functionality also via setting the trigger to countdown. So there's in my opinion more point in changing it like desired in this ticket than to keep it this way.

@indeedpete this is how the trigger works. The timer is a simple delay before "on act" gets executed it is not a delay before unit can know about you.

True, but the biki states that if you use the trigger in timeout mode the condition must be satisfied throughout the whole given time. When the condition is met in countdown mode the onAct is simply delayed. I'm just saying that the way it is now, is redundant even if it's not a bug. In this case here it doesn't matter whether you use timeout or countdown - the outcome is the same. And that should be changed in my opinion, so we don't have to use (simple) workarounds to achieve the desired goal.

Look, this is very simple. Place 2 independent units in the editor not in formation. Make one face you (call it bob) and the other looking away from you (call it bill). Preview and execute:

hint str [bob knowsAbout player, bill knowsAbout player]

hint shows [4,4]

This means you have been detected by one unit and it communicated this to his friend. This is why you cannot simply make yourself undetected by killing bob.

its not redundant because the logic is correct every time for both cases, you just haven't furthered refined what you are checking for - what KK said isn't a workaround, its just the missing logic of what you are trying to accomplish.

i found that Detected By returns FALSE after about 1 minute 30 seconds (i'm sure thats altered by who they were able to tell before death) - set up a trigger with the condition: 'hintsilent str(this); this', get a unit's attention, kill them, and time how long it takes to turn false again. i would imagine the logic of DETECTEDBY lingers for that time to ensure triggers in missions that only check every 30 seconds for example will not skip by and miss their cue

F2kSel added a subscriber: F2kSel.May 7 2016, 3:29 PM

If you kill bob and he's the only unit on the map the trigger still fires.

The same if you delete him.

The trigger doesn't re-check the detecting unit it, it assumes that condition hasn't changed.

The only way to stop it is to remove the detected unit from the trigger area as that's the condition it checks the second time around.

@F2k_Sel maybe bob sent a letter in the post? :) The trigger is after all "detected by" not "being detected by". Some sort of command to reset knowsAbout would have been nice though.

you can but it won't work either

[bob] join grpnull

"The trigger doesn't re-check the detecting unit it, it assumes that condition hasn't changed."

thats not true, in timeout mode it constantly checks the condition is true. i double checked earlier (check my last post), if you do the trigger like i say, and have the timeout >1:30, the trigger won't fire, because Detected-by eventually returns back to false. (in the case of a single unit, it seems to be about 1:30)

Yes that does seem to work although a little bit hit and miss.

I've had it work at 95 seconds and later fail at the same (Haven't checked A3 only A2/OA) but worked again when set at 100.

However it isn't much help if you only want to check it after 10 seconds.

So the question remains is it a bug or the desired effect.

SgtWrbk added a subscriber: SgtWrbk.May 7 2016, 3:29 PM

I found a workaround.

You'll need 2 triggers:

  1. One main trigger (for alarm, backup etc)- your trigger you had issues with.
  2. For enemy unit.

STEPS:

-Name your enemy unit "unit1".

-Set "detected by" trigger with timeout and type in:
CONDITION: this && alive unit1;
ON ACT: a = 1;

-In your main (alarm etc) trigger type in:
CONDITION: a == 1;

-There you go!

EDIT:
I found another and easier solution that can also be used with more enemies.

  1. Name your player "player1" and your enemy "unit1".
  1. Set "detected by" alarm trigger.

CONDITIONS: this && unit1 knowsabout player1 > 3 && alive unit1;

2.1 For more enemies:
CONDITIONS: this && ((unit1 knowsabout player1 > 3 && alive unit1) OR (unit2 knowsabout player1 > 3 && alive unit2) OR etc......);

bhaz added a subscriber: bhaz.May 7 2016, 3:29 PM
bhaz added a comment.Aug 15 2014, 1:28 PM

Late to the party here, but this achieves the behaviour you were after. (It's just Killzone's solution from above plus the && alive check) - without it there is still a deactivation delay of roughly 20-30 seconds even if all units are dead.

{_x knowsAbout player > 0 && alive _x} count thisList > 0

After looking into this further, "Detected by" triggers take exactly 100 seconds to deactivate even if there are no units of that side left alive.