Jump to content
Sign in to follow this  
madrussian

Side-spanning joins resulting in "Non-Reactive" units... Part 2. New related issue!

Recommended Posts

Hi all,

I've uncovered another join-related issue that results in "non-reactive" units, which can be a serious problem. Fortunately, Suma, Dwarden and company were listening about this other "non-reactive" units bug, and they were able to provide a timely fix. Many thanks for that! :)

The new issue is distinct, but very closely related to the first. The method is a bit different this time, but again it's 100% repeatable.

Here's the setup. In the editor, three men only, all on foot. One Shooter (east side), one Target (civilian side, unarmed), and one Observer (the player, civ a good choice as he won't interfere). The Shooter is placed in the editor, and the Target (Res unit created to a civ group) is created on-the-fly via createUnit, directly behind the Shooter and out of view. The Shooter's knowsAbout level to the Target is constantly monitored, as well as the various infos provided by nearTargets (position, type, side, subjective cost, object, and position accuracy), again regarding the Shooter to the Target. The important items in this list are "side", "type", and "cost".

Three scenarios. The 1st and 2nd work as expected, the 3rd results in the repeatable game bug!

Scenario One - Target switches sides, then moves into full view of Shooter:

  1. "Shooter knowsAbout Target" value starts out at zero (which makes sense as the Target is standing behind and out of view of Shooter)
  2. Target switches actual side from Civilian to Resistance (via join command to a newly created group).
  3. Target moves into peripheral view of Shooter. "Shooter knowsAbout Target" value naturally goes up to something above zero and less than 1.5
  4. At this point, Shooter perceives the Target to be Civilian side (reflected by nearTargets realtime value "side"), even though the Target is actually Resistance side. This is correct, based on the Shooter's current limited knowledge of his Target.
  5. Target moves into full view of Shooter. "Shooter knowsAbout Target" value naturally jumps up to maximum value of 4.
  6. Shooter learns the actual side of Target is Resistance (reflected by nearTargets realtime value "side"). Note the Shooter also learns the "type" and assigns a appropriate positive "cost" value to the Target, indicating a threat. (again reflected by nearTargets realtime values)
  7. Shooter opens fire and kills Target, as expected.

So far so good...

Scenario Two - Target moves into full view of Shooter, then switches sides:

  1. "Shooter knowsAbout Target" value starts out at zero (which makes sense as the Target is standing behind and out of view of Shooter)
  2. Target moves into peripheral view of Shooter. "Shooter knowsAbout Target" value naturally goes up to something above zero and less than 1.5
  3. At this point, Shooter perceives the Target to be Civilian side (reflected by nearTargets realtime value "side"). Note the Shooter is making a preliminary observation.
  4. Target moves into full view of Shooter. "Shooter knowsAbout Target" value naturally jumps up to maximum value of 4.
  5. The Shooter now knows the "type" and assigns a appropriate negative "cost" value to the Target, indicating the Target is not a threat. (reflected by nearTargets realtime values)
  6. Target switches actual side from Civilian to Resistance (via join command to a newly created group).
  7. Shooter detects the actual side of Target changed to Resistance (reflected by nearTargets realtime value "side"). The Shooter's "cost" value to the Target is updated appropriately (positive), indicating the Target's new status as a threat!
  8. Shooter opens fire and kills Target, as expected.

Again, everything good so far. Now the problem...

Scenario Three - Target switches sides at a specific and critical point with respect to the Shooter's knowledge of him (see details):

  1. "Shooter knowsAbout Target" value starts out at zero (which makes sense as the Target is standing behind and out of view of Shooter)
  2. Target moves into peripheral view of Shooter. "Shooter knowsAbout Target" value naturally goes up to something above zero and less than 1.5
  3. At this point, Shooter perceives the Target to be Civilian side (reflected by nearTargets realtime value "side"). Note the Shooter is making a preliminary observation.
  4. With the "Shooter knowsAbout Target" value between zero and 1.5, the Target switches actual side from Civilian to Resistance (via join command to a newly created group).
  5. Target moves into full view of Shooter. "Shooter knowsAbout Target" value naturally jumps up to maximum value of 4.
  6. At this point, Shooter has detected the actual side of Target changed to Resistance (reflected by nearTargets realtime value "side"). The Shooter's "cost" value to the Target is updated appropriately (positive), indicating the Target's new status as a threat. However...
  7. The problem: Although the Shooter should open fire on the Target, he does not!!! If the Target is given a weapon and ammo at this point and turned towards the Shooter, he should open fire, but does not either!!! They both just stand there and stare at each other... indefinitely. Again, this problem is 100% repeatable.

Couple extra points, in case they help fix this bug:

At this point (Shooter "non-reactive" to Target and vice-versa), there are a couple repeatable ways to reset the threat detection algorithms:

  • If the Shooter is joined to a newly generated East side group, he will open fire on Target.
  • Upon doing "Target setCaptive true; sleep 3; Target setCaptive false;" the Shooter will open fire on Target.

Note- I wouldn't really consider these workarounds... although I certainly hope they help characterize the issue!


Also another potential issue, possibly related:

Same scenario as above, unarmed Target is standing behind and out of view of Shooter.

  • If you switch sides of Target to from Civilian to Resistance (via join), followed by "Shooter reveal [Target, 4]", the Shooter spins around and shoots the Target.
  • However, if you do "Shooter reveal [Target, 4]" first, followed by switching sides of Target to from Civilian to Resistance (via join), the shooter does not spin around to shoot at the target.

Btw- I can make a couple succinct test missions fairly quickly to showcase the problem(s), if desired.

Thanks all. :)

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
Sign in to follow this  

×