Member
Last active 7 years ago
Okay, i have it working, however the AI seem to be now going after each objective in the order that the objectives are created, so the first one in the list is the one they will always go to first, is there a way to change this behavior and make them go for the nearest objective instead of the one they are told about first, seen as it is on the other side of the map from where they start, and this adds predictability as they will always choose the same general route.
} forEach _factions;
} forEach OPCOM_INSTANCES;
};
This section chucks out a script error, with OPCOM_INSTANCES as an undefined variable.
This looks great, if you find an alternate method to that sleep command that is a tad more reliable that might be useful, as i usually run this on my communities dedicated server, with anywhere from 20-40 players and ALiVE can take upwards of 10 minutes sometimes to load up a mission on altis. So something other than guessing the time taken would be more reliable, if you or anyone else can think of something. But thanks for the help this is exactly what i need. :D
Glad to hear there is a method for this. :)
I was planning on using the Military placement (Cust. Obj.) module, in an asym game mode, to get the AI commander to spread out to the nearest objective instead of the most important one that might be on the other side of the map. However i have run into the problem that it spawns a custom military objective, and i need custom civilian ones, because they won't recruit at military objectives. Is there a way to get the custom objective module to spawn custom civilian objectives, or a similar work around?
Will do some more testing of this now tomorrow then, thanks for the reply. :)
@SpyderBlack723 If you have control of the area then it would see that as a hostile zone and act accordingly. If you want to make an FOB in an area that won't have an objective then you can use this little script.
setFOB.sqf :
_caller = _this select 1; cjb_addObjectiveToSides = { private["_objectiveParams","_factions","_faction","_opcom","_opcomSide"]; _objectiveParams = _this select 0; _factions = _this select 1; { _opcom = _x; { _faction = _x; _opcomSide = [_opcom,"side",""] call ALiVE_fnc_HashGet; if( _opcomSide == _faction) then { [_opcom, "addObjective", _objectiveParams] call ALiVE_fnc_OPCOM; }; } forEach _factions; } forEach OPCOM_INSTANCES; }; _n = format["%1_obj", floor (random 1000)]; [[_n, getPos _caller, 100,"MIL"],["WEST","EAST"]] call cjb_addObjectiveToSides; hint "FOB has been set";and then simply add an action to a unit to use the script:
this addAction ["Set FOB","setFOB.sqf"];This will create an objective at the location of the person using the "Set FOB" action and then register to OPCOM sides East and West (Can be changed according to your needs).
.. I haven't messed around with it yet but you could do some interesting stuff with this aswell, like setting up a trigger on an FOB you created and then when hostile units are within that trigger, the base is registered as an objective to the enemy opcom.
With the 0.9.8 i'm not sure if this is working properly now the AI don't seem to be recognizing it as an enemy position they had orders to fallback to an FOB i set up, and to setup a depot there, is there a way to force it to be a bluefor objective when it is initially spawned, or at least to a debug to show what side holds it, as far as i'm aware in Asym mode debug it shows the hostility levels of that objective, which are also spawning at 10 on FOB's i create. :/
I have noticed that when in the Asymmetric mode, in the recruitment HQ there are often explosives placed as a kind of trap, usually IED's of varying sizes though i have seen demo blocks used as well. However i can walk up to them freely and they don't seem to explode? Is this intentional or a bug? It seemed to make logical sense that within the premise of the game this was to act as a "self destruct" mechanism of sorts for forces coming to destroy the HQ's.
Side note: On a slightly different question, but i didnt want to make a whole new thread about. What does it take to actually destroy a HQ or depot. I have destroyed the building that the HQ was marked as on the map. However the debug "Recruitment HQ" marker doesn't dissapear, at what point does the Opcom recognize it as destroyed?
Didn't think so, as far as i can tell asymmetric is designed to slowly spread out, though i am unsure if they will spread further than there initial marker. E.G if they start with placements inside a 3000x3000 marker, will they eventually start occupying things 6000 meters away?
Thanks that is certainly going to help with the FOB aspect, just now need an answer to the first part, though i am starting to think it isn't possible to make what i am looking for.