Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enemies Glitching through walls #518

Open
TheMagicalKing opened this issue Jun 17, 2021 · 1 comment
Open

Enemies Glitching through walls #518

TheMagicalKing opened this issue Jun 17, 2021 · 1 comment
Labels
Bohemia Level The issue is (mostly) within Bohemia's power to fix wontfix This will not be worked on

Comments

@TheMagicalKing
Copy link

Enemies glitch through walls despite an opening that's unaffected by any placeable structure.

How to replicate:

  • [find a construction site or any house that can be reinforced]

  • [reinforce the area with military walls leaving an opening]

@Ansible2 Ansible2 added Bohemia Level The issue is (mostly) within Bohemia's power to fix bug Something isn't working wontfix This will not be worked on and removed bug Something isn't working labels Jun 21, 2021
@aussie-battler
Copy link
Contributor

aussie-battler commented Aug 29, 2021

Here is how I fixed it:

  1. SaltyDog.abramia\Functions\Build\fn_placeObject.sqf line 74 add:
[[_object], 'bulwark\solidObject.sqf'] remoteExec ['execVM', 2];

Here is the file: https://pastebin.com/h5hJ8syD

  1. Create a folder in your mission directory and call it "bulwark". Add a file to it solidObject.sqf
    Your misson folder should look like SaltyDog.abramia\bulwark\solidObject.sqf

Add this code to solidObject.sqf

private ["_object","_isHeld","_loopCount","_foundAIArr","_objRadius","_nearAI","_isPlaced","_aiDir","_aiGoToPos","_safePos"];

_object  = _this select 0;
_isHeld = _object getVariable "BLWK_heldObject";
_loopCount = 0;
_foundAIArr = [];
while {!(_object isEqualTo objNull) && !_isHeld} do {
    if (_loopcount >= 20) then {
        _loopCount = 0;
        _foundAIArr = [];
    };
    _loopCount = _loopCount + 1;
    _objRadius = (_object getVariable "Radius") + 1;
    _nearAI = _object nearEntities _objRadius;
    _isPlaced = _object getVariable "BLWK_heldObject";
    {
      if (SUICIDE_WAVE && (alive _x) && (side _x == east)) then {
        _x setDamage 1;
        deleteVehicle _object;
      }else{
        if (side _x == east && !(_x in _foundAIArr) && (alive _x)) then {
          doStop _x;
          _x disableAI "MOVE";
          _aiDir = _object getDir _x;
          _x setDir _aiDir;
          _aiGoToPos = _object getRelPos [random [-10,0,-10], _aiDir];
          _x setBehaviour "CARELESS";
          _x setUnitPos "UP";
          _x playActionNow "FastF";
          _x forceSpeed 6;
          _safePos = [_aiGoToPos, 0, 8, 2, 0] call BIS_fnc_findSafePos;
          _x enableAI "MOVE";
          _x doMove _safePos;
          _foundAIArr pushBack _x;
        };
      };
    } foreach _nearAI;
    sleep 0.1;
};

All my ideas came from here: https://github.com/Omnomios/DynamicBulwarks/blob/8778abe4b939d15946f17a785b51ec021de8697e/bulwark/solidObject.sqf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bohemia Level The issue is (mostly) within Bohemia's power to fix wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants