if (_currenttime - _starttime >= _timeout_time && !_player_near) then {_timeout = true;};
// ...
};
- ... which means, if player starts missions, then leave and no other player is interested to finish it, mission will stay till restart...
There is more what I would like to ask, but I have to admit, I'm sick at these days and my brain doesn't work as I want :) So my question is: is it build this way by design or am I missing here? Thank you very much for your time. Cheers, iben
[L8083]: https://github.com/f3cuk/WICKED-AI/blob/master/WAI/compile/mission_winorfail.sqf#L80-L83
[L15]: https://github.com/f3cuk/WICKED-AI/blob/master/WAI/compile/mission_winorfail.sqf#L15
[L87L89]: https://github.com/f3cuk/WICKED-AI/blob/a85d0ae3c5d54d7063f185fec46d448e73c3b4f8/WAI/compile/mission_winorfail.sqf#L87-L89
Hello guys, this is probably not issue - just I'm missing somenthing or it's designed this way: Here is the thing related to _mission_winorfail_:
"Problem":
Every mission should despawn on completition or on timeout.
If player steps into _wai_timeoutdistance, switcher _playernear is fired ([L80-83][L8083]):
Because switcher _playernear is declared outside loop ([L15][L15])...
... once it's _playernear set to true, mission is not able despawn on timeout ([L87-L89][L87L89]):
...because there is not _playernear reset in loop and player presence cannot be revalidate:
{ if((isPlayer _x) && (_x distance _position <= wai_timeout_distance)) then { _player_near = true; }; } count playableUnits;
if (_currenttime - _starttime >= _timeout_time && !_player_near) then {_timeout = true;}; // ... };