Page MenuHomeFeedback Tracker

AI do not receive user addAction commands
Reviewed, NormalPublic

Description

Since the 1.68 update AI no longer receive access to actions created by the user with addAction under command menu 6.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
AI Control / Commanding
Steps To Reproduce
  • Create a blank editor scenario with 2+ units
  • Call addAction via external script or debug console attached to any unit or object (e.g. unit2 addAction ["Test Action", {}];)
  • Select an AI unit with F1-10
  • Open action command menu with 6
  • Action will not appear in list
Additional Information

Player will receive the action in their action menu as should be expected if the conditions permit. Tested with shortened and extended addAction syntax with no difference and varied some of the parameters that seemed relevant with no difference (radius, condition and priority). Scripts using this functionality worked prior to 1.68.

Event Timeline

mbrdmn created this task.Mar 19 2017, 11:07 AM

Yeah, none of our Ai can utilize any addactions on objects since 1.68

I don't have this problem with addAction on AI or object, from Eden at least. Tested on a half-year old mission, addAction in unit init field or written in initServer.sqf.

razazel changed the task status from New to Reviewed.Mar 23 2017, 12:01 PM
razazel claimed this task.
PiepMGI added a comment.EditedMar 23 2017, 7:02 PM

I was testing your steps, Vanilla context, just your scenario, when i realized two weird things in editor:

  • formerly i named a unit u2. As I placed a countdown trigger for your addAction, no condition at all,... this didn't fire. Back in the editor, there was nothing named u2 anymore (and no u2 in left column entity of course) BUT i couldn't name the unit u2 again because this variable was already existing.. somewhere! First time I see that!
  • anyway, i changed for un2 in unit field and un2 in trigger. Then the unit stayed named un2 as it must. But, no joy on trigger:

I changed the countdown no condition trigger, un2 addAction ["Test Action", {hint "ok"}]
for a radio Alpha trigger, and:
0 = [] spawn {waitUntil {!isNil "un2"}; hint "zob"; un2 addAction ["Test Action", {hint "ok"}]};
No hint at all when triggered by radio!
Tested just a hint... nothing;
I copied the activation field, erase the radio alpha trigger, created a new one, pasted the exact previous code.. tada! It works!

IMHO:

  • addAction works in 1.68 (It's the case in my own scenarios much more complex (I use it for dialogs with indep AI units.);
  • triggers, but probably not only, can have bad behavior due to the mission.sqm configuration. Something lost. And probably this could explain a present/not present named unit (u2 at the start of my comment);
  • my topic about doArtilleryFire is probably linked with a trigger problem. Sorry about that.

Thanks.