When calling this function to set up a Static Weapon, the program will hang and freeze for 30 - 40 seconds. Also the resultant static weapon is not able to be crewed. This only happens when called as a BIS Function and passed parameters.
Description
Details
- Legacy ID
- 2233963773
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Category
- Game Freezes
- Select group (F2) in editor.
- Side: Bluefor. Faction: NATO. Class: Support Infantry.
- Select HMG, GMG or Mortar team.
- Give a group name e.g. grpSWT = group this;
- Place two markers & name them mkrBase & mkrTarget.
- add trigger set to radio alpha.
- in the On Act field add:
handle = [grpSWT, getMarkerPos "mkrBase", getMarkerPos "mkrTarget"] call BIS_fnc_unpackStaticWeapon;
- Call the function by calling radio Alpha.
The code does not cause a overload hang when converted to a normal sqf file executed with execVM instead.
so...
_group = [_this, 0, grpNull] call bis_fnc_param;
_position = [_this, 1, grpNull] call bis_fnc_param;
_targetPos = [_this, 2, grpNull] call bis_fnc_param;
is replaced by (for example)...
_group = grpSWT;
_position = getMarkerPos "mkrBase";
_targetPos = getMarkerPos "mkrTarget";
The script run fine except for some strange problems.
A) The gunner tries to setup two static weapons when. Often one or both become destroyed.
B) Tripod bag does not disappear.
C) _tripodBP = nearestObject [_position,"B_HMG_01_support_F"]; result in an <NULL -object> .
D) Tries to delete the above NULL object. Probably an attempt to delete the bag.
One more Minor problem. The script tries to make the Team Leader use binoculars, but they don't have any by default. This doesn't cause any real problems.