When we synchronise moduleRespawnVehicle with vehicle and use the option desertedDistance,
only vehicles created during game starting can respawn when they are deserted.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 8 x64
- Operating System Version
- 1.98.146373
- Category
- Scripting
Steps To Reproduce
Synchronise an empty vehicle with the module moduleRespawnVehicle_F,
use following settings:
Delay = 1
DesertedDistance = 5
RespawnCount = -1
Init = ""
Position = 0
PositionType = 0
Wreck = 0
ShowNotification = 1
ForcedRespawn = 0
RespawnWhenDisabled = true
Additional Information
When we put in Init this code, we soluce problem.
/* **** Made by Tequiller **** */ params [ ["_newVehicle", objNull, [objNull]], ["_oldVehicle", objNull, [objNull]] ]; //Old Vehicle Remove Handlers _oldVehicle removeMPEventHandler ["mpkilled", _oldVehicle getvariable ["BIS_fnc_moduleRespawnVehicle_mpkilled", -1]]; _oldVehicle removeMPEventHandler ["mphit", _oldVehicle getvariable ["BIS_fnc_moduleRespawnVehicle_mphit", -1]]; _oldVehicle removeEventHandler ["getout", _oldVehicle getvariable ["BIS_fnc_moduleRespawnVehicle_getout", -1]]; _oldVehicle removeEventHandler ["getin", _oldVehicle getvariable ["BIS_fnc_moduleRespawnVehicle_getin", -1]]; //New Vehicle Init Variables { _newVehicle setvariable [_x, nil]; } forEach [ "BIS_fnc_moduleRespawnVehicle_cannotMove", "BIS_fnc_moduleRespawnVehicle_getin", "BIS_fnc_moduleRespawnVehicle_getout", "BIS_fnc_moduleRespawnVehicle_mphit" ]; ([_newVehicle] + (_newVehicle getVariable "BIS_fnc_moduleRespawnVehicle_data")) call BIS_fnc_moduleRespawnVehicle;
This code should be writed in [BIS_fnc_moduleRespawnVehicle.sqf] just after the following lines
//--- Unflag killed event _newVeh setvariable ["BIS_fnc_moduleRespawnVehicle_mpkilled", nil];
Related Objects
Related Objects