trigger-spawned custom objective not recognized/attacked by Military AI Commander

  1. 4 weeks ago

    Hello everyone! I am sorry if this is a ridiculously stupid question, but I am new to ALiVE mission making, and this problem drives me crazy for days already.

    I am building a mission for some friends, which starts with a bit of a story mode, and then develops into a more dynamic campaign.
    What I have done is place an OPFOR Military AI commander (set to invasion mode) and a synced military placement custom objective north of the Airfield in Chernarus (in the Eden Editor). These work perfectly, units are spawned and since there is no objective to capture, they patrol the area. I also created a trigger that checks if a certain AI has been killed. Once it has, it executes the following code, which i found on the wiki (script snippets; Add a Custom OPCOM Objective):

    if (isServer) then {{[_x,"addObjective", ["airfield_obj", [4710.93,10224.409,0], 700, "MIL", 200] ] call ALiVE_fnc_OPCOM; } foreach OPCOM_INSTANCES};

    To my understanding, this code should create another military placement military objective (on the airfield actually), which is recognized and synced by every other Military AI commander on the map, and therefore attacked (basically as revenge that the uppermentioned AI has been killed). This doesnt happen though. In debug mode I can see a marker (EAST #airfield_obj) being created at the airfield location, but the OPFPR units in the north continue only patrolling, and do not attack the new objective.

    What am I doing wrong here? the only thing i can think of is that the objective is somehow already considered to be occupied by OPFOR (since it for some reason is called EAST)?

  2. 3 weeks ago

    @SpyderBlack723 @marceldev89 ?

  3. marceldev89

    Mar 29 Moderator

    It should work just fine but it might take 1 or 2 cycles for OPCOM to pickup the objective (5 minutes per cycle). The marker being labeled "EAST" just means that the objective is registered for that side and doesn't imply that it's "occupied" by that side.

  4. 2 weeks ago

    Thank you guys for the reply. The problem was that the airfield was not occupied by blue. once i spawned some blue units there, the reds picked up and attacked. cheers!


or Sign Up to reply!