Jump to content
lexx

doWatch vehicle behaviour

Recommended Posts

Is it just me or does doWatch not work reliable anymore? I have a scene in which a vehicle is firing on certain positions (helper objects). This always worked, but now I've noticed that... it doesn't anymore. The vehicle actually does "look" into the direction, but it won't point its gun directly at the object anymore, resulting in every shot completely missing. The catch is, though, if I let the vehicle target the player... he suddenly is able to move his gun up and down again.

 

I'm toying around with it for a while now and it's slowly driving me nuts. 

Share this post


Link to post
Share on other sites

Has exactly the same effect.

Share this post


Link to post
Share on other sites

What daviddoss said ^^^ More reliable

 

DoWatch was never that great for getting a weapon pointed a certain way as it always seems that a soldier ordered to doWatch Enemy could actually stand perpendicular to Enemy and be considered by the engine to be 'doWatching him'. The reason being peripheral vision im guessing..

 

Edit: Bummer. Did you try invisible enemy targets?

Share this post


Link to post
Share on other sites
8 minutes ago, froggyluv said:

Edit: Bummer. Did you try invisible enemy targets?

 

Not yet. Only exchanged the helper objects with game logics, in the hopes of things to change, but nothing.

 

I feel a bit reluctant to do this invisible enemy workaround, because doWatch worked correctly in that mission for years, and also... because it is yet another workaround.

 

/Edit: Just tried the invisible soldier, but again, same effect, the AI just won't point the vehicle turret at it.

Share this post


Link to post
Share on other sites
9 hours ago, lexx said:

Is it just me or does doWatch not work reliable anymore? I have a scene in which a vehicle is firing on certain positions (helper objects). This always worked, but now I've noticed that... it doesn't anymore. The vehicle actually does "look" into the direction, but it won't point its gun directly at the object anymore, resulting in every shot completely missing. The catch is, though, if I let the vehicle target the player... he suddenly is able to move his gun up and down again.

 

I'm toying around with it for a while now and it's slowly driving me nuts. 

 

Try to do the same in a new mission. Vehicle, targets, codes, (triggers). Just that. Sometimes, it's just a question of mess in entities/attributes mission.sqm. If Ok, I 'm afraid you can replace all your afferent objects/codes in your old mission. Another cause could be a too heavy code preempting the scheduler slot (3ms), depending on how did you load the bark for your scenario.

Share this post


Link to post
Share on other sites

Here is a repro mission:

https://pastebin.com/auWQwRdh

 

The APC will move his turret to the positions, but not up and down to aim at the targets. I'm using from ... to ... here to loop the gunfire and randomly assign a target, but even if I assign a fixed target first, it changes nothing.

 

Like I wrote before, this worked flawless for at least two years (I just yesterday found out that it doesn't work anymore, so I sadly don't know since when it does *not* work anymore).

Share this post


Link to post
Share on other sites

But does it matter? Even if I don't use bis_fnc_fire, the turret simply won't watch the target (correctly), which is the core problem.

 

Also, unless I do something wrong,

FIA_GORGON1 fireAtTarget [pos_gorgon_fire1,"autocannon_30mm_CTWS"];

Doesn't work at all.

 

I've also tried a combination with revealing the objects to the vehicle, but no change either.

Share this post


Link to post
Share on other sites

Well... I don't have any problem making FIA_GORGON1 with your script (uploaded pastebin). I just replaced your trigger by a radio Alpha, repeatable one. Verify the position and area of yours... I will not surprised if you delete/re-add the same trigger, with the same code to make it work.

Check also the distance of the logics. I placed them at ~ 200m from Gorgon, on Tanoa airfield.

Share this post


Link to post
Share on other sites

Have to digg up that thread again, because I (still) just can't make it to work. Yes, the Gorgon fires his weapon, but the gun isn't pointing at where it should.

 

I just had the same experience again with the Kajman helicopter. doTarget, doWatch, doCommandTarget, ... the gun just won't point at where it should and this drives me crazy.

Share this post


Link to post
Share on other sites

Bah, most of these BI commands/functions don't care for target. So, especially for negative elevation (in your mission), you should use doSuppressiveFire.

Tested:

0 = [] spawn {
 private ["_target"];
  sleep 4;
  for "_i" from 1 to 20 do {
sleep 0.25;
  _target = (selectRandom [pos_gorgon_fire1,pos_gorgon_fire2,pos_gorgon_fire3,pos_gorgon_fire4]);
  gunner FIA_GORGON1 doWatch _target;
   gunner FIA_GORGON1 doSuppressiveFire _target };
 
 gunner FIA_GORGON1 doWatch objNull;
};
On the other hand, the number of shots is not strictly equal to 20.

Share this post


Link to post
Share on other sites

Yeah, but that doesn't work for the Kajman helicopter. 🙂

Well, at least it didn't for me. It seemed like he tried, but in the end that's all it was... a try.

Share this post


Link to post
Share on other sites

Ever have any luck with this? I'm having the same issue. Tanks and APC's work great just not helicopters

 

 

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

×