Page MenuHomeFeedback Tracker

ModuleZoneRestriction_F Doesn't reset punishment when you go back into the zone
New, NormalPublic

Description

First of all, it was hard to figure out how to use this module. Now I synced the module to a trigger that has Any Player Present, Repeatable as condition. Then synced the module to the player that's inside the trigger and not allowed to leave.

Now the trigger part works. Only during the warning time the time ticker in the module doesn't stop resulting into getting punished even tough you walked back into the zone. This is because in the Zone Restriction FSM Function - CHECK this part of code is called when the trigger is de-activated:

[_x, _warningTime, _inverse, _trgs, _effectPunishment, _airExcluded] spawn {
	_deserter = _this select 0;
	_warningTime = _this select 1;
	_inverse = _this select 2;
	_trgs = _this select 3;
	_effectPunishment = _this select 4;
	_airExcluded = _this select 5;
	_t = time;

	while {time < _t + _warningTime && (if (_inverse) then {{vehicle _deserter in list _x} count _trgs > 0} else {{vehicle _deserter in list _x} count _trgs == 0}) && (if (_airExcluded && vehicle _deserter isKindOf "Air") then {FALSE} else {TRUE})} do {
		sleep 1
	};
	if (time >= _t + _warningTime) then {_deserter call _effectPunishment} else {_deserter setVariable ["BIS_deserter", FALSE]};
};

I guess this is supposed to set the variable "BIS_deserter" to false when the trigger is reactivated again. Although because you pass _trgs in the spawn function _trgs will never change in this while loop thus it will be impossible to get "BIS_deserter" reset even when the _trgrs that gets passed into the [] spawn {} contains the activated trigger again.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Eden Editor
Steps To Reproduce
  1. Put down a trigger with Any Player Present, Repeatable as condition
  2. Put down a player in the trigger
  3. Put down a ModuleZoneRestriction_F
  4. Sync the module with the trigger and the player
Additional Information

This module is overal very confusing.

Event Timeline

JFisher created this task.Feb 17 2019, 2:38 PM
JFisher renamed this task from ModuleZoneRestriction_F Doesn't allow you to go back into the zone to ModuleZoneRestriction_F Doesn't reset punishment when you to go back into the zone.Feb 17 2019, 2:42 PM
JFisher renamed this task from ModuleZoneRestriction_F Doesn't reset punishment when you to go back into the zone to ModuleZoneRestriction_F Doesn't reset punishment when you go back into the zone.
JFisher updated the task description. (Show Details)Feb 17 2019, 2:44 PM