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

VCOM AI sniper engage #149

Open
joeyo123 opened this issue Sep 1, 2019 · 1 comment
Open

VCOM AI sniper engage #149

joeyo123 opened this issue Sep 1, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@joeyo123
Copy link

joeyo123 commented Sep 1, 2019

Describe the bug
Receiving an error message when the special ai setting for marksmen/snipers is enabled; the error message "Error undefined variable in expression: vcm_fnc_sniperengage" is shown
To Reproduce
Steps to reproduce the behavior:

  1. Turn on vcom ai sniper setting
  2. tell them to engage a target (with zeus or something similar)
  3. error pops up

Expected behavior
Well i supposed the specific ai setting for sniper ai would mean they would stay where they are and engage from a long distance rather than do what regular ai do and flank/assault the enemy position

Screenshots
https://steamcommunity.com/sharedfiles/filedetails/?id=1850860673

VCOM Version:
current updated steam version

Additional mods used:
bug was able to be replicated on vanilla arma 3 (only vcom installed)

Additional context
Add any other context about the problem here.

@joeyo123 joeyo123 added the bug Something isn't working label Sep 1, 2019
@GoldJohnKing
Copy link

I'm using 3.3.3-develop branch script version downloaded from github, I got more detailed information about sniper engage bug.

The First error I encounter:

11:38:51 Error in expression <etSkill 0.9;
_x allowFleeing 0;			
{
_x setSkill _x;
} forEach VCM_AIDIFA;


if >
11:38:51   Error position: <setSkill _x;
} forEach VCM_AIDIFA;


if >
11:38:51   Error setskill: type array,Object expected
11:38:51 File Vcom\Functions\VCM_Functions\fn_SniperEngage.sqf [VCM_fnc_SniperEngage]..., line 53

{
_x setSkill _x;
} forEach VCM_AIDIFA;

This error was caused by Magical Value _x, the first and the second _x are all entities of "VCM_AIDIFA" instead of first "_x"=="_Snipers" and second "_x"=="VCM_AIDIFA". You cannot use _x in multiple forEach like this.

So I use solid values

_x setSkill ["aimingShake",0.1];
_x setSkill ["aimingSpeed",0.75];
_x setSkill ["aimingAccuracy",0.8];

to replace the original one

{
	_x setSkill _x;
} forEach VCM_AIDIFA;

and the error solved. You might have a better solution.

After I overided above function to make it correct, the next error shows up:

13:00:10   Error position: <forceWeaponFire [ primaryWeapon _x,(sele>
13:00:10   Error Type Any, String Expected
13:00:10 File Vcom\Functions\VCM_Functions\fn_SniperEngage.sqf [VCM_fnc_SniperEngage]..., line 80

_x forceWeaponFire [ primaryWeapon _x,(selectrandom _FireModes)];

I'm not sure what caused the second error, so I just deleted that line.

Then I start a mission and during init process, this error pops up:

14:50:16   Error position: <_x spawn {sleep 2;if !(unitPos _this isE>
14:50:16   Error missing;
14:50:16 File Vcom\Functions\VCM_Functions\fn_SniperEngage.sqf [VCM_fnc_SniperEngage]..., line 81

_x spawn {sleep 2;if !(unitPos _this isEqualTo "Auto") then {_this setUnitPos "Auto"};};

I dont know about this at all... So I submit the reply tohelp you developers have a more detailed information about sniper engage issue than the issue poster's.

The development of sniper engage function is still in a very early stage, I suggest users who read this issue to disable that function until further changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants