Jim90 Posted October 25, 2014 Report Share Posted October 25, 2014 Installed this today on my Epoch 1051 Chernarus server and it looks like "UralWreck" should be removed from line 26 _heliModel. Found this error in my RPT. 19:45:15 "RUNNING EVENT: animated_crash_spawner on [2014,10,24,11,45]" 19:45:17 "CRASHSPAWNER: 100% chance to start a crashing Ural with loot table 'MilitarySpecial'" 19:45:17 "CRASHSPAWNER: Ural started flying from [9712,663.067] to [12768.6,8721.77] NOW!(TIME:1572||LT:MilitarySpecial)" 19:45:32 "CRASHSPAWNER: Ural just exploded at [9711.95,662.92,-8.02478]!" Made one little change because I did not want the high end ammo spawning. In line 21, I changed the _lootTable from "HeliCrash" to "MilitarySpecial" Excellent mod. Thanks. Link to comment Share on other sites More sharing options...
Thiefnuker Posted November 3, 2014 Report Share Posted November 3, 2014 Hello! I lately installed this on my Epoch Server (private) and played for about a week (a lot of playtime :P) but have never observed any crash or marker. I assume this mod does not conflict with WAI's Markers so I'm certain that the event simply doesn't get called. I'm sort of new to the server modding and debugging in ArmA II. What ways do you suggest to spot the mistake I've made? Are there lige debug consoles that let me trigger the script manually or anything like that? What I've done: Downloaded+Unpacked. Moved animated_crash_spawner.sqf to dayz_server (epoch server pbo ofc) under "modules" Added EpochEvents. My EpochEvents array looks like this now: EpochEvents = [ ["any","any","any","any",30,"animated_crash_spawner"],["any","any","any","any",0,"animated_crash_spawner"],["any","any","any","any",15,"animated_crash_spawner"], ["any","any","any","any",15,"supply_drop"] ]; I sure hope its possible to trigger the last two events both at '15. Thanks for any help in advance, Thief Link to comment Share on other sites More sharing options...
f3cuk Posted November 6, 2014 Author Report Share Posted November 6, 2014 Try this EpochEvents = [ ["any","any","any","any",0,"animated_crash_spawner"], ["any","any","any","any",15,"animated_crash_spawner"], ["any","any","any","any",30,"supply_drop"], ["any","any","any","any",45,"animated_crash_spawner"] ]; Link to comment Share on other sites More sharing options...
MasterHiggins Posted January 14, 2015 Report Share Posted January 14, 2015 Planes and helis flying full speed, how can i make them slower? Link to comment Share on other sites More sharing options...
R4id3n84 Posted January 17, 2015 Report Share Posted January 17, 2015 Hi so i installed this on My Namalsk Test server as i'm currently building my Namalsk server However its not working no crash wrecks showing up on map and no markers Here is my animated_crash_spawner.sqf /* Script Name: animated_crash_spawner.sqf Original Author: Grafzahl / Finest Modified by BushWookie & Forgotten for Epoch Modified by f3cuk for Epoch 1051 Script Version: 1.3.2 */ private["_show_name","_show_marker", "_finder","_timeAdjust","_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos","_useStatic","_crashDamage","_lootRadius","_preWaypoints","_preWaypointPos","_endTime","_startTime","_safetyPoint","_heliStart","_deadBody","_exploRange","_heliModel","_lootPos","_list","_craters","_dummy","_wp2","_wp3","_landingzone","_aigroup","_wp","_helipilot","_crash","_crashwreck","_smokerand","_staticcoords","_pos","_dir","_mdot","_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName","_marker", "_markerRadius","_hint","_itemTypes"]; _spawnChance = 100; // Percent chance of spawning a crash number between 0 - 100 _guaranteedLoot = 8; // Guaranteed Loot Spawns _randomizedLoot = 8; // Random number of loot piles as well as the guaranteed ones _spawnFire = true; // Spawn Smoke/Fire at the helicrash _fadeFire = false; // Fade the Smoke/Fire overtime _preWaypoints = 2; // Amount of way points the heli flies to before crashing _crashDamage = 1; // Amount of damage the heli can take before crashing (between 0.1 and 1) Lower the number and the heli can take less damage before crashing 1 damage is fully destroyed and 0.1 something like a DMR could one shot the heli _exploRange = 200; // How far away from the predefined crash point should the heli start crashing _minLootRadius = 4; // Minimum distance for loot to spawn from the crash site in meters _maxLootRadius = 10; // Maximum distance for loot to spawn from the crash site in meters _lootTable = "HeliCrash"; // Name of the loot table the heli gets loot from (DO NOT edit unless you know what your doing) _markerRadius = 400; // Radius for the marker _show_marker = true; // Show a marker on the map _show_name = true; // Add the crashname to the marker /* do not change below values if you do not know what you are doing */ _plane = false; _spawnMarker = "center"; _heliModel = ["UH1Y_DZE","UH1H_DZE","MV22","Mi17_DZ","UH60M_EP1","UH1H_TK_EP1","UralWreck","UH60M_EP1","UH1H_TK_EP1","UH60M_MEV_EP1","A10","Ka52Black","Mi24_D","AH1Z","AV8B","Su25_TK_EP1"] call BIS_fnc_selectRandom; _crashModel = "UH1Wreck_DZ"; _spawnRadius = HeliCrashArea; _heliStart = [[5046.9678, 5943.2656],[6360.792, 6582.0723],[3544.4153, 6451.7793],[7504.9102, 5786.3271],[7752.436, 7067.6895],[3920.3354, 7530.4941],[6448.9805, 8406.374],[6098.7876, 10094.43],[4745.8853, 10273.457],[8271.7441, 10356.828]] call BIS_fnc_selectRandom; _porh = "helicopter"; _safetyPoint = [0,16000,0]; _crashName = getText (configFile >> "CfgVehicles" >> _heliModel >> "displayName"); _spawnRoll = round(random 100); _finder = ""; if(_heliModel == "Su25_TK_EP1") then { _lootTable = "MilitarySpecial"; _crashModel = "SU25Wreck"; _plane = true; _guaranteedLoot = 4; }; if(_heliModel == "AV8B") then { _lootTable = "MilitarySpecial"; _crashModel = "AV8BWreck"; _plane = true; _guaranteedLoot = 5; }; if(_heliModel == "AH1Z") then { _lootTable = "MilitarySpecial"; _crashModel = "AH1ZWreck"; _guaranteedLoot = 4; }; if(_heliModel == "Mi24_D") then { _lootTable = "MilitarySpecial"; _crashModel = "Mi24Wreck"; _guaranteedLoot = 5; }; if(_heliModel == "Ka52Black") then { _lootTable = "MilitarySpecial"; _crashModel = "Ka52Wreck"; _guaranteedLoot = 3; }; if(_heliModel == "Mi17_DZ") then { _crashModel = "Mi8Wreck"; }; if(_heliModel == "UH60M_EP1") then { _crashModel = "UH60Wreck_DZ"; }; if(_heliModel == "A10") then { _lootTable = "MilitarySpecial"; _crashModel = "A10Wreck"; _plane = true; _guaranteedLoot = 2; }; if(_heliModel == "MV22") then { _lootTable = "Hospital"; _crashModel = "MV22Wreck"; _plane = true; _guaranteedLoot = 24; }; if(_heliModel == "UH60M_MEV_EP1") then { _lootTable = "Hospital"; _crashModel = "UH60Wreck_DZ"; _guaranteedLoot = 16; }; diag_log(format["CRASHSPAWNER: %1%2 chance to start a crashing %3 with loot table '%4'", _spawnChance, '%', _crashName, _lootTable]); if (_spawnRoll <= _spawnChance) then { if(_plane) then { _porh = "plane"; }; [nil,nil,rTitleText,format["A %1 is in distress! Watch for it and go to the crash site to secure the loot!",_porh], "PLAIN",10] call RE; _position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos; diag_log(format["CRASHSPAWNER: %1 started flying from %2 to %3 NOW!(TIME:%4||LT:%5)", _crashName, str(_heliStart), str(_position), round(time), _lootTable]); _startTime = time; _crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"]; _crashwreck setCombatMode "BLUE"; _crashwreck engineOn true; _crashwreck flyInHeight 150; if (_plane) then { _crashDamage = .5; _crashwreck setDamage .4; _crashwreck forceSpeed 250; _crashwreck setspeedmode "LIMITED"; } else { _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; }; _landingzone = createVehicle ["HeliHEmpty", [_position select 0, _position select 1,0], [], 0, "CAN_COLLIDE"]; _aigroup = creategroup civilian; _helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"]; _helipilot setCombatMode "BLUE"; _helipilot moveindriver _crashwreck; _helipilot assignAsDriver _crashwreck; sleep 0.5; if(_preWaypoints > 0) then { for "_x" from 1 to _preWaypoints do { _preWaypointPos = [getMarkerPos _spawnMarker, 0, _spawnRadius, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _wp = _aigroup addWaypoint [_preWaypointPos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "CARELESS"; }; }; _wp2 = _aigroup addWaypoint [position _landingzone, 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointStatements ["true", "_crashwreck setdamage 1;"]; _wp3 = _aigroup addWaypoint [_safetyPoint, 0]; _wp3 setWaypointType "CYCLE"; _wp3 setWaypointBehaviour "CARELESS"; waituntil {(_crashwreck distance _position) <= 1000 || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; if (_plane) then { _crashwreck flyInHeight 100; _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; _exploRange = 360; } else { _crashwreck flyInHeight 100; _crashwreck forceSpeed 100; _crashwreck setspeedmode "NORMAL"; }; waituntil {(_crashwreck distance _position) <= _exploRange || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; deletevehicle _helipilot; if (_plane) then { _crashwreck setdamage 1; _vel = velocity _crashwreck; _dir = direction _crashwreck; _speed = 100; _crashwreck setVelocity [(_vel select 0)-(sin _dir*_speed),(_vel select 1)-(cos _dir*_speed),(_vel select 2) - 30]; } else { _crashwreck setHit ["mala vrtule", 1]; _ran15 = random 15; _crashwreck setVelocity [_ran15,_ran15,-25]; _crashwreck setdamage .9; waitUntil{sleep 1; getpos _crashwreck select 2 <= 30}; _helipilot setdamage 1; _crashwreck setVelocity [_ran15,_ran15,-20]; waitUntil{sleep 1; getpos _crashwreck select 2 <= 10}; _crashwreck setdamage 1; }; waitUntil{sleep 1; getpos _crashwreck select 2 <= 5}; diag_log(format["CRASHSPAWNER: %1 just exploded at %2!", _crashName, getpos _crashwreck]); _pos = [getpos _crashwreck select 0, getpos _crashwreck select 1,0]; _dir = getdir _crashwreck; deletevehicle _crashwreck; deletevehicle _landingzone; _isWater = surfaceIsWater [getpos _crashwreck select 0, getpos _crashwreck select 1]; if(_isWater) then { [nil,nil,rTitleText,format["The %1 has crashed into the water, no loot can be secured",_porh], "PLAIN",10] call RE; } else { _crash = createVehicle [_crashModel, _pos, [], 0, "CAN_COLLIDE"]; _crash setDir _dir; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash]; if (_spawnFire) then { PVDZE_obj_Fire = [_crash, 4, time, false, _fadeFire]; publicVariable "PVDZE_obj_Fire"; }; _num = round(random _randomizedLoot) + _guaranteedLoot; if (DZE_MissionLootTable) then { _itemTypes = [] + getArray(missionConfigFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); } else { _itemTypes = [] + getArray(configFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); }; _CBLBase = dayz_CBLBase find(toLower(_lootTable)); _weights = dayz_CBLChances select _CBLBase; _cntWeights = count _weights; for "_x" from 1 to _num do { _maxLootRadius = (random _maxLootRadius) + _minLootRadius; _lootPos = [_pos, _maxLootRadius, random 360] call BIS_fnc_relPos; _index1 = floor(random _cntWeights); _index2 = _weights select _index1; _itemType = _itemTypes select _index2; [_itemType select 0, _itemType select 1, _lootPos, 5] call spawn_loot; diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2'", _lootPos, _lootTable]); _nearby = _pos nearObjects ["ReammoBox", sizeOf(_crashModel)]; { _x setVariable ["permaLoot",true]; } forEach _nearBy; }; _endTime = time - _startTime; [nil,nil,rTitleText,format["The %1 has crashed, go and secure the loot!",_porh], "PLAIN",10] call RE; diag_log(format["CRASHSPAWNER: Crash completed! Wreck at: %2 - Runtime: %1 Seconds || Distance from calculated POC: %3 meters", round(_endTime), str(_pos), round(_position distance _crash)]); if(_show_marker) then { _marker_position = [_pos,0,_markerRadius,0,1,2000,0] call BIS_fnc_findSafePos; _marker = createMarker [ format ["loot_event_marker_%1", _startTime], _marker_position]; _marker setMarkerShape "ELLIPSE"; _marker setMarkerColor "ColorYellow"; _marker setMarkerAlpha 0.5; _marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)]; _marker setMarkerText _crashName; if(_show_name) then { _mdot = createMarker [format ["dot_%1", _startTime], _marker_position]; _mdot setMarkerColor "ColorBlack"; _mdot setMarkerType "mil_dot"; _mdot setMarkerText _crashName; }; }; waitUntil { sleep 5; _playerPresent = false; { if((isPlayer _x) && (_x distance _pos <= 25)) then { _playerPresent = true; _finder = name _x; }; } foreach playableUnits; (_playerPresent) }; [nil,nil,rTitleText,format["Survivors have secured the crash site!"], "PLAIN",10] call RE; if(_show_marker) then { deleteMarker _marker; if(_show_name) then { deleteMarker _mdot; }; }; diag_log(format["CRASHSPAWNER: Crash found by %1, removing the marker" , _finder]); }; }; Here is my Epoch Events // Server Events EpochEvents = [ ["any","any","any","any",0,"animated_crash_spawner"], ["any","any","any","any",15,"animated_crash_spawner"], ["any","any","any","any",30,"supply_drop"], ["any","any","any","any",45,"animated_crash_spawner"] ]; Any idea what could be wrong? Thanks in Advance Ps.. How do i do a Spoiler as i hate spamming with code Thanks Again R4id3n84 Link to comment Share on other sites More sharing options...
lonewolfgaming Posted March 6, 2015 Report Share Posted March 6, 2015 I have installed this on my server and have a question. I'm running Epoch 1.0.5.1 and map is Chernarus, the question is, the mission starts and has the info come on screen about the distressed heli, but when it claims it has crashes the down heli is not there. What might be causing this to not spawn it like it should? Link to comment Share on other sites More sharing options...
Bob_the_K Posted June 20, 2015 Report Share Posted June 20, 2015 I sometimes get the same thing. Sometimes there's a crash, sometimes not. But I do see this in my .rpt on occasion: 18:15:03 "CRASHSPAWNER: UH-1H started flying from [8839.41,10397] to [13561.3,15824.7] NOW!(TIME:452||LT:HeliCrash)" 18:16:01 "TIME SYNC: Local Time set to [2013,8,3,13,16]" 18:16:06 "infiSTAR.de Log: Vehicle destroyed @116101 - UH1H_TK_EP1, worldspace [189.265,[11648.3,14889.5,57.016]], CharId 0, objID 0, objUID 0, nearby []" Could Infistar be removing the crash as soon as it happens? If so how do I stop that from happening? Link to comment Share on other sites More sharing options...
SpiritWolfix Posted July 20, 2015 Report Share Posted July 20, 2015 Hey, Richie, I did everything as instructed, but helicopters anyway not, in logs no information about them. Link to comment Share on other sites More sharing options...
Hux Posted July 26, 2015 Report Share Posted July 26, 2015 Would it be possible to add the C130 in this script or maybe just replace one of the models already used? Link to comment Share on other sites More sharing options...
Petite Posted August 9, 2015 Report Share Posted August 9, 2015 Is it possible to remove the marker, too easy for players to find it. I want them to search crash site as the normal one. Thanks awesome script. Link to comment Share on other sites More sharing options...
Hux Posted August 9, 2015 Report Share Posted August 9, 2015 I removed the messages and markers. I just commented out those parts of the script. Just set marker to false. _show_marker = false; Here's my crash_spawner.sqf /* Script Name: animated_crash_spawner.sqf Original Author: Grafzahl / Finest Modified by BushWookie & Forgotten for Epoch Modified by f3cuk for Epoch 1051 Script Version: 1.3.2 */ private["_show_name","_show_marker", "_finder","_timeAdjust","_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos","_useStatic","_crashDamage","_lootRadius","_preWaypoints","_preWaypointPos","_endTime","_startTime","_safetyPoint","_heliStart","_deadBody","_exploRange","_heliModel","_lootPos","_list","_craters","_dummy","_wp2","_wp3","_landingzone","_aigroup","_wp","_helipilot","_crash","_crashwreck","_smokerand","_staticcoords","_pos","_dir","_mdot","_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName","_marker", "_markerRadius","_hint","_itemTypes"]; _spawnChance = 100; // Percent chance of spawning a crash number between 0 - 100 _guaranteedLoot = 8; // Guaranteed Loot Spawns _randomizedLoot = 8; // Random number of loot piles as well as the guaranteed ones _spawnFire = true; // Spawn Smoke/Fire at the helicrash _fadeFire = false; // Fade the Smoke/Fire overtime _preWaypoints = 2; // Amount of way points the heli flies to before crashing _crashDamage = 1; // Amount of damage the heli can take before crashing (between 0.1 and 1) Lower the number and the heli can take less damage before crashing 1 damage is fully destroyed and 0.1 something like a DMR could one shot the heli _exploRange = 200; // How far away from the predefined crash point should the heli start crashing _minLootRadius = 4; // Minimum distance for loot to spawn from the crash site in meters _maxLootRadius = 10; // Maximum distance for loot to spawn from the crash site in meters _lootTable = "HeliCrash"; // Name of the loot table the heli gets loot from (DO NOT edit unless you know what your doing) _markerRadius = 400; // Radius for the marker _show_marker = false; // Show a marker on the map _show_name = false; // Add the crashname to the marker /* do not change below values if you do not know what you are doing */ _plane = false; _spawnMarker = "center"; _heliModel = ["UH1Y_DZE","UH1H_DZE","MV22","Mi17_DZ","UH60M_EP1","UH1H_TK_EP1","UralWreck","UH60M_EP1","UH1H_TK_EP1","UH60M_MEV_EP1","A10","Ka52Black","Mi24_D","AH1Z","AV8B","Su25_TK_EP1"] call BIS_fnc_selectRandom; _crashModel = "UH1Wreck_DZ"; _spawnRadius = HeliCrashArea; _heliStart = [[862.89911, 816.75781],[2884.9204, 1093.1793],[3923.7927, 1078.5016],[6571.9326, 1575.0684],[3046.9241, 2413.4119],[5652.1348, 2944.7871],[1866.0063, 4954.5566],[3748.3994, 5456.0498],[6348.8232, 4448.1694],[8368.7148, 7673.5293]] call BIS_fnc_selectRandom; _porh = "helicopter"; _safetyPoint = [0,16000,0]; _crashName = getText (configFile >> "CfgVehicles" >> _heliModel >> "displayName"); _spawnRoll = round(random 100); _finder = ""; if(_heliModel == "Su25_TK_EP1") then { _lootTable = "MilitarySpecial"; _crashModel = "SU25Wreck"; _plane = true; _guaranteedLoot = 4; }; if(_heliModel == "AV8B") then { _lootTable = "MilitarySpecial"; _crashModel = "AV8BWreck"; _plane = true; _guaranteedLoot = 5; }; if(_heliModel == "AH1Z") then { _lootTable = "MilitarySpecial"; _crashModel = "AH1ZWreck"; _guaranteedLoot = 4; }; if(_heliModel == "Mi24_D") then { _lootTable = "MilitarySpecial"; _crashModel = "Mi24Wreck"; _guaranteedLoot = 5; }; if(_heliModel == "Ka52Black") then { _lootTable = "MilitarySpecial"; _crashModel = "Ka52Wreck"; _guaranteedLoot = 3; }; if(_heliModel == "Mi17_DZ") then { _crashModel = "Mi8Wreck"; }; if(_heliModel == "UH60M_EP1") then { _crashModel = "UH60Wreck_DZ"; }; if(_heliModel == "A10") then { _lootTable = "MilitarySpecial"; _crashModel = "A10Wreck"; _plane = true; _guaranteedLoot = 2; }; if(_heliModel == "MV22") then { _lootTable = "Hospital"; _crashModel = "MV22Wreck"; _plane = true; _guaranteedLoot = 24; }; if(_heliModel == "UH60M_MEV_EP1") then { _lootTable = "Hospital"; _crashModel = "UH60Wreck_DZ"; _guaranteedLoot = 16; }; diag_log(format["CRASHSPAWNER: %1%2 chance to start a crashing %3 with loot table '%4'", _spawnChance, '%', _crashName, _lootTable]); if (_spawnRoll <= _spawnChance) then { if(_plane) then { _porh = "plane"; }; //[nil,nil,rTitleText,format["A %1 is in distress! Watch for it and go to the crash site to secure the loot!",_porh], "PLAIN",10] call RE; _position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos; diag_log(format["CRASHSPAWNER: %1 started flying from %2 to %3 NOW!(TIME:%4||LT:%5)", _crashName, str(_heliStart), str(_position), round(time), _lootTable]); _startTime = time; _crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"]; _crashwreck setCombatMode "BLUE"; _crashwreck engineOn true; _crashwreck flyInHeight 150; if (_plane) then { _crashDamage = .5; _crashwreck setDamage .4; _crashwreck forceSpeed 250; _crashwreck setspeedmode "LIMITED"; } else { _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; }; _landingzone = createVehicle ["HeliHEmpty", [_position select 0, _position select 1,0], [], 0, "CAN_COLLIDE"]; _aigroup = creategroup civilian; _helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"]; _helipilot setCombatMode "BLUE"; _helipilot moveindriver _crashwreck; _helipilot assignAsDriver _crashwreck; sleep 0.5; if(_preWaypoints > 0) then { for "_x" from 1 to _preWaypoints do { _preWaypointPos = [getMarkerPos _spawnMarker, 0, _spawnRadius, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _wp = _aigroup addWaypoint [_preWaypointPos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "CARELESS"; }; }; _wp2 = _aigroup addWaypoint [position _landingzone, 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointStatements ["true", "_crashwreck setdamage 1;"]; _wp3 = _aigroup addWaypoint [_safetyPoint, 0]; _wp3 setWaypointType "CYCLE"; _wp3 setWaypointBehaviour "CARELESS"; waituntil {(_crashwreck distance _position) <= 1000 || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; if (_plane) then { _crashwreck flyInHeight 100; _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; _exploRange = 360; } else { _crashwreck flyInHeight 100; _crashwreck forceSpeed 100; _crashwreck setspeedmode "NORMAL"; }; waituntil {(_crashwreck distance _position) <= _exploRange || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; deletevehicle _helipilot; if (_plane) then { _crashwreck setdamage 1; _vel = velocity _crashwreck; _dir = direction _crashwreck; _speed = 100; _crashwreck setVelocity [(_vel select 0)-(sin _dir*_speed),(_vel select 1)-(cos _dir*_speed),(_vel select 2) - 30]; } else { _crashwreck setHit ["mala vrtule", 1]; _ran15 = random 15; _crashwreck setVelocity [_ran15,_ran15,-25]; _crashwreck setdamage .9; waitUntil{sleep 1; getpos _crashwreck select 2 <= 30}; _helipilot setdamage 1; _crashwreck setVelocity [_ran15,_ran15,-20]; waitUntil{sleep 1; getpos _crashwreck select 2 <= 10}; _crashwreck setdamage 1; }; waitUntil{sleep 1; getpos _crashwreck select 2 <= 5}; diag_log(format["CRASHSPAWNER: %1 just exploded at %2!", _crashName, getpos _crashwreck]); _pos = [getpos _crashwreck select 0, getpos _crashwreck select 1,0]; _dir = getdir _crashwreck; deletevehicle _crashwreck; deletevehicle _landingzone; _isWater = surfaceIsWater [getpos _crashwreck select 0, getpos _crashwreck select 1]; if(_isWater) then { //[nil,nil,rTitleText,format["The %1 has crashed into the water, no loot can be secured",_porh], "PLAIN",10] call RE; } else { _crash = createVehicle [_crashModel, _pos, [], 0, "CAN_COLLIDE"]; _crash setDir _dir; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash]; if (_spawnFire) then { PVDZE_obj_Fire = [_crash, 4, time, false, _fadeFire]; publicVariable "PVDZE_obj_Fire"; }; _num = round(random _randomizedLoot) + _guaranteedLoot; if (DZE_MissionLootTable) then { _itemTypes = [] + getArray(missionConfigFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); } else { _itemTypes = [] + getArray(configFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); }; _CBLBase = dayz_CBLBase find(toLower(_lootTable)); _weights = dayz_CBLChances select _CBLBase; _cntWeights = count _weights; for "_x" from 1 to _num do { _maxLootRadius = (random _maxLootRadius) + _minLootRadius; _lootPos = [_pos, _maxLootRadius, random 360] call BIS_fnc_relPos; _index1 = floor(random _cntWeights); _index2 = _weights select _index1; _itemType = _itemTypes select _index2; [_itemType select 0, _itemType select 1, _lootPos, 5] call spawn_loot; diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2'", _lootPos, _lootTable]); _nearby = _pos nearObjects ["ReammoBox", sizeOf(_crashModel)]; { _x setVariable ["permaLoot",true]; } forEach _nearBy; }; _endTime = time - _startTime; //[nil,nil,rTitleText,format["The %1 has crashed, go and secure the loot!",_porh], "PLAIN",10] call RE; diag_log(format["CRASHSPAWNER: Crash completed! Wreck at: %2 - Runtime: %1 Seconds || Distance from calculated POC: %3 meters", round(_endTime), str(_pos), round(_position distance _crash)]); if(_show_marker) then { _marker_position = [_pos,0,_markerRadius,0,1,2000,0] call BIS_fnc_findSafePos; _marker = createMarker [ format ["loot_event_marker_%1", _startTime], _marker_position]; _marker setMarkerShape "ELLIPSE"; _marker setMarkerColor "ColorYellow"; _marker setMarkerAlpha 0.5; _marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)]; _marker setMarkerText _crashName; if(_show_name) then { _mdot = createMarker [format ["dot_%1", _startTime], _marker_position]; _mdot setMarkerColor "ColorBlack"; _mdot setMarkerType "mil_dot"; _mdot setMarkerText _crashName; }; }; waitUntil { sleep 5; _playerPresent = false; { if((isPlayer _x) && (_x distance _pos <= 25)) then { _playerPresent = true; _finder = name _x; }; } foreach playableUnits; (_playerPresent) }; //[nil,nil,rTitleText,format["Survivors have secured the crash site!"], "PLAIN",10] call RE; if(_show_marker) then { deleteMarker _marker; if(_show_name) then { deleteMarker _mdot; }; }; diag_log(format["CRASHSPAWNER: Crash found by %1, removing the marker" , _finder]); }; }; Link to comment Share on other sites More sharing options...
Petite Posted August 9, 2015 Report Share Posted August 9, 2015 I removed the messages and markers. I just commented out those parts of the script. Just set marker to false. _show_marker = false; Here's my crash_spawner.sqf /* Script Name: animated_crash_spawner.sqf Original Author: Grafzahl / Finest Modified by BushWookie & Forgotten for Epoch Modified by f3cuk for Epoch 1051 Script Version: 1.3.2 */ private["_show_name","_show_marker", "_finder","_timeAdjust","_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos","_useStatic","_crashDamage","_lootRadius","_preWaypoints","_preWaypointPos","_endTime","_startTime","_safetyPoint","_heliStart","_deadBody","_exploRange","_heliModel","_lootPos","_list","_craters","_dummy","_wp2","_wp3","_landingzone","_aigroup","_wp","_helipilot","_crash","_crashwreck","_smokerand","_staticcoords","_pos","_dir","_mdot","_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName","_marker", "_markerRadius","_hint","_itemTypes"]; _spawnChance = 100; // Percent chance of spawning a crash number between 0 - 100 _guaranteedLoot = 8; // Guaranteed Loot Spawns _randomizedLoot = 8; // Random number of loot piles as well as the guaranteed ones _spawnFire = true; // Spawn Smoke/Fire at the helicrash _fadeFire = false; // Fade the Smoke/Fire overtime _preWaypoints = 2; // Amount of way points the heli flies to before crashing _crashDamage = 1; // Amount of damage the heli can take before crashing (between 0.1 and 1) Lower the number and the heli can take less damage before crashing 1 damage is fully destroyed and 0.1 something like a DMR could one shot the heli _exploRange = 200; // How far away from the predefined crash point should the heli start crashing _minLootRadius = 4; // Minimum distance for loot to spawn from the crash site in meters _maxLootRadius = 10; // Maximum distance for loot to spawn from the crash site in meters _lootTable = "HeliCrash"; // Name of the loot table the heli gets loot from (DO NOT edit unless you know what your doing) _markerRadius = 400; // Radius for the marker _show_marker = false; // Show a marker on the map _show_name = false; // Add the crashname to the marker /* do not change below values if you do not know what you are doing */ _plane = false; _spawnMarker = "center"; _heliModel = ["UH1Y_DZE","UH1H_DZE","MV22","Mi17_DZ","UH60M_EP1","UH1H_TK_EP1","UralWreck","UH60M_EP1","UH1H_TK_EP1","UH60M_MEV_EP1","A10","Ka52Black","Mi24_D","AH1Z","AV8B","Su25_TK_EP1"] call BIS_fnc_selectRandom; _crashModel = "UH1Wreck_DZ"; _spawnRadius = HeliCrashArea; _heliStart = [[862.89911, 816.75781],[2884.9204, 1093.1793],[3923.7927, 1078.5016],[6571.9326, 1575.0684],[3046.9241, 2413.4119],[5652.1348, 2944.7871],[1866.0063, 4954.5566],[3748.3994, 5456.0498],[6348.8232, 4448.1694],[8368.7148, 7673.5293]] call BIS_fnc_selectRandom; _porh = "helicopter"; _safetyPoint = [0,16000,0]; _crashName = getText (configFile >> "CfgVehicles" >> _heliModel >> "displayName"); _spawnRoll = round(random 100); _finder = ""; if(_heliModel == "Su25_TK_EP1") then { _lootTable = "MilitarySpecial"; _crashModel = "SU25Wreck"; _plane = true; _guaranteedLoot = 4; }; if(_heliModel == "AV8B") then { _lootTable = "MilitarySpecial"; _crashModel = "AV8BWreck"; _plane = true; _guaranteedLoot = 5; }; if(_heliModel == "AH1Z") then { _lootTable = "MilitarySpecial"; _crashModel = "AH1ZWreck"; _guaranteedLoot = 4; }; if(_heliModel == "Mi24_D") then { _lootTable = "MilitarySpecial"; _crashModel = "Mi24Wreck"; _guaranteedLoot = 5; }; if(_heliModel == "Ka52Black") then { _lootTable = "MilitarySpecial"; _crashModel = "Ka52Wreck"; _guaranteedLoot = 3; }; if(_heliModel == "Mi17_DZ") then { _crashModel = "Mi8Wreck"; }; if(_heliModel == "UH60M_EP1") then { _crashModel = "UH60Wreck_DZ"; }; if(_heliModel == "A10") then { _lootTable = "MilitarySpecial"; _crashModel = "A10Wreck"; _plane = true; _guaranteedLoot = 2; }; if(_heliModel == "MV22") then { _lootTable = "Hospital"; _crashModel = "MV22Wreck"; _plane = true; _guaranteedLoot = 24; }; if(_heliModel == "UH60M_MEV_EP1") then { _lootTable = "Hospital"; _crashModel = "UH60Wreck_DZ"; _guaranteedLoot = 16; }; diag_log(format["CRASHSPAWNER: %1%2 chance to start a crashing %3 with loot table '%4'", _spawnChance, '%', _crashName, _lootTable]); if (_spawnRoll <= _spawnChance) then { if(_plane) then { _porh = "plane"; }; //[nil,nil,rTitleText,format["A %1 is in distress! Watch for it and go to the crash site to secure the loot!",_porh], "PLAIN",10] call RE; _position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos; diag_log(format["CRASHSPAWNER: %1 started flying from %2 to %3 NOW!(TIME:%4||LT:%5)", _crashName, str(_heliStart), str(_position), round(time), _lootTable]); _startTime = time; _crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"]; _crashwreck setCombatMode "BLUE"; _crashwreck engineOn true; _crashwreck flyInHeight 150; if (_plane) then { _crashDamage = .5; _crashwreck setDamage .4; _crashwreck forceSpeed 250; _crashwreck setspeedmode "LIMITED"; } else { _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; }; _landingzone = createVehicle ["HeliHEmpty", [_position select 0, _position select 1,0], [], 0, "CAN_COLLIDE"]; _aigroup = creategroup civilian; _helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"]; _helipilot setCombatMode "BLUE"; _helipilot moveindriver _crashwreck; _helipilot assignAsDriver _crashwreck; sleep 0.5; if(_preWaypoints > 0) then { for "_x" from 1 to _preWaypoints do { _preWaypointPos = [getMarkerPos _spawnMarker, 0, _spawnRadius, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _wp = _aigroup addWaypoint [_preWaypointPos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "CARELESS"; }; }; _wp2 = _aigroup addWaypoint [position _landingzone, 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointStatements ["true", "_crashwreck setdamage 1;"]; _wp3 = _aigroup addWaypoint [_safetyPoint, 0]; _wp3 setWaypointType "CYCLE"; _wp3 setWaypointBehaviour "CARELESS"; waituntil {(_crashwreck distance _position) <= 1000 || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; if (_plane) then { _crashwreck flyInHeight 100; _crashwreck forceSpeed 150; _crashwreck setspeedmode "NORMAL"; _exploRange = 360; } else { _crashwreck flyInHeight 100; _crashwreck forceSpeed 100; _crashwreck setspeedmode "NORMAL"; }; waituntil {(_crashwreck distance _position) <= _exploRange || !alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage}; deletevehicle _helipilot; if (_plane) then { _crashwreck setdamage 1; _vel = velocity _crashwreck; _dir = direction _crashwreck; _speed = 100; _crashwreck setVelocity [(_vel select 0)-(sin _dir*_speed),(_vel select 1)-(cos _dir*_speed),(_vel select 2) - 30]; } else { _crashwreck setHit ["mala vrtule", 1]; _ran15 = random 15; _crashwreck setVelocity [_ran15,_ran15,-25]; _crashwreck setdamage .9; waitUntil{sleep 1; getpos _crashwreck select 2 <= 30}; _helipilot setdamage 1; _crashwreck setVelocity [_ran15,_ran15,-20]; waitUntil{sleep 1; getpos _crashwreck select 2 <= 10}; _crashwreck setdamage 1; }; waitUntil{sleep 1; getpos _crashwreck select 2 <= 5}; diag_log(format["CRASHSPAWNER: %1 just exploded at %2!", _crashName, getpos _crashwreck]); _pos = [getpos _crashwreck select 0, getpos _crashwreck select 1,0]; _dir = getdir _crashwreck; deletevehicle _crashwreck; deletevehicle _landingzone; _isWater = surfaceIsWater [getpos _crashwreck select 0, getpos _crashwreck select 1]; if(_isWater) then { //[nil,nil,rTitleText,format["The %1 has crashed into the water, no loot can be secured",_porh], "PLAIN",10] call RE; } else { _crash = createVehicle [_crashModel, _pos, [], 0, "CAN_COLLIDE"]; _crash setDir _dir; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash]; if (_spawnFire) then { PVDZE_obj_Fire = [_crash, 4, time, false, _fadeFire]; publicVariable "PVDZE_obj_Fire"; }; _num = round(random _randomizedLoot) + _guaranteedLoot; if (DZE_MissionLootTable) then { _itemTypes = [] + getArray(missionConfigFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); } else { _itemTypes = [] + getArray(configFile >> "CfgBuildingLoot" >> _lootTable >> "lootType"); }; _CBLBase = dayz_CBLBase find(toLower(_lootTable)); _weights = dayz_CBLChances select _CBLBase; _cntWeights = count _weights; for "_x" from 1 to _num do { _maxLootRadius = (random _maxLootRadius) + _minLootRadius; _lootPos = [_pos, _maxLootRadius, random 360] call BIS_fnc_relPos; _index1 = floor(random _cntWeights); _index2 = _weights select _index1; _itemType = _itemTypes select _index2; [_itemType select 0, _itemType select 1, _lootPos, 5] call spawn_loot; diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2'", _lootPos, _lootTable]); _nearby = _pos nearObjects ["ReammoBox", sizeOf(_crashModel)]; { _x setVariable ["permaLoot",true]; } forEach _nearBy; }; _endTime = time - _startTime; //[nil,nil,rTitleText,format["The %1 has crashed, go and secure the loot!",_porh], "PLAIN",10] call RE; diag_log(format["CRASHSPAWNER: Crash completed! Wreck at: %2 - Runtime: %1 Seconds || Distance from calculated POC: %3 meters", round(_endTime), str(_pos), round(_position distance _crash)]); if(_show_marker) then { _marker_position = [_pos,0,_markerRadius,0,1,2000,0] call BIS_fnc_findSafePos; _marker = createMarker [ format ["loot_event_marker_%1", _startTime], _marker_position]; _marker setMarkerShape "ELLIPSE"; _marker setMarkerColor "ColorYellow"; _marker setMarkerAlpha 0.5; _marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)]; _marker setMarkerText _crashName; if(_show_name) then { _mdot = createMarker [format ["dot_%1", _startTime], _marker_position]; _mdot setMarkerColor "ColorBlack"; _mdot setMarkerType "mil_dot"; _mdot setMarkerText _crashName; }; }; waitUntil { sleep 5; _playerPresent = false; { if((isPlayer _x) && (_x distance _pos <= 25)) then { _playerPresent = true; _finder = name _x; }; } foreach playableUnits; (_playerPresent) }; //[nil,nil,rTitleText,format["Survivors have secured the crash site!"], "PLAIN",10] call RE; if(_show_marker) then { deleteMarker _marker; if(_show_name) then { deleteMarker _mdot; }; }; diag_log(format["CRASHSPAWNER: Crash found by %1, removing the marker" , _finder]); }; }; Thanks I'm gonna do that. Link to comment Share on other sites More sharing options...
nikas455 Posted October 7, 2015 Report Share Posted October 7, 2015 How to add two event at the same time? EVENT (job only one) EpochEvents = [["any","any","any","any",60,"animated_crash_spawner"],["any","any","any","any",30,"animated_crash_spawner2"]]; Link to comment Share on other sites More sharing options...
MatthewK Posted January 7, 2016 Report Share Posted January 7, 2016 On 07/10/2015 at 9:54 AM, nikas455 said: How to add two event at the same time? EVENT (job only one) EpochEvents = [["any","any","any","any",60,"animated_crash_spawner"],["any","any","any","any",30,"animated_crash_spawner2"]]; Create a file called double_crash.sqf (or whatever works for you) .. Edit that file and add these three lines.. [] execVM "\z\addons\dayz_server\modules\animated_crash_spawner2.sqf"; sleep 15; //You don't want both helis spawning in the same spot and exploding (could happen). [] execVM "\z\addons\dayz_server\modules\animated_crash_spawner.sqf"; Save it, upload it to your modules folder. then add: double_crash to the epoch event timer. Done! You run one event (script) that now launches your two crash spawner script at the same time .... Link to comment Share on other sites More sharing options...
DrInca Posted March 4, 2016 Report Share Posted March 4, 2016 @theguys who dont see any helis/planes flying. On my server the helis/planes are flying over the water and freezes there. After some time they crash and it says: "No loot can be found, heli crashed into the Water" or so. I dont know how I can fix that the helis are flying over the map. Anyone have an idea ? Link to comment Share on other sites More sharing options...
Pro_Speedy Posted April 23, 2016 Report Share Posted April 23, 2016 No matter what i set _crashdamage to or setdamage i can't get the planes/helis to be damaged where they take a couple of shots to be taken down Any help? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now