mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
add missing BIS effects files
This commit is contained in:
40
SQF/dayz_code/system/BIS_Effects/init.sqf
Normal file
40
SQF/dayz_code/system/BIS_Effects/init.sqf
Normal file
@@ -0,0 +1,40 @@
|
||||
[] spawn {
|
||||
while {true} do {
|
||||
waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})};
|
||||
diag_log "Res3tting B!S effects...";
|
||||
/* BIS_Effects_* fixes from Dwarden */
|
||||
BIS_Effects_Rifle = {false};
|
||||
BIS_Effects_EH_Fired = {false};
|
||||
BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
|
||||
BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
|
||||
BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
|
||||
BIS_Effects_Secondaries = "\z\addons\dayz_code\system\BIS_Effects\secondaries.sqf";
|
||||
|
||||
BIS_Effects_globalEvent = {
|
||||
BIS_effects_gepv = _this;
|
||||
publicVariable "BIS_effects_gepv";
|
||||
_this call BIS_Effects_startEvent;
|
||||
};
|
||||
|
||||
BIS_Effects_startEvent = {
|
||||
switch (_this select 0) do {
|
||||
case "AirDestruction": {
|
||||
[_this select 1] spawn BIS_Effects_AirDestruction;
|
||||
};
|
||||
case "AirDestructionStage2": {
|
||||
[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
|
||||
};
|
||||
case "Burn": {
|
||||
[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"BIS_effects_gepv" addPublicVariableEventHandler {
|
||||
(_this select 1) call BIS_Effects_startEvent;
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
};
|
||||
};
|
||||
|
||||
22
SQF/dayz_code/system/BIS_Effects/secondaries.sqf
Normal file
22
SQF/dayz_code/system/BIS_Effects/secondaries.sqf
Normal file
@@ -0,0 +1,22 @@
|
||||
private ["_v","_int","_list","_lifecheck","_effect2pos","_t"];
|
||||
|
||||
_v=_this select 0;
|
||||
_int=_this select 1;
|
||||
_list=[];
|
||||
_lifecheck=true;
|
||||
if(count _this>2)then{
|
||||
_lifecheck=_this select 2
|
||||
};
|
||||
_int=_int min 3;
|
||||
if(!((_v isKindOf"Air")OR{((_v isKindOf"LandVehicle")OR{(_v isKindOf"Ship")})}))exitWith{};
|
||||
_effect2pos=_v selectionposition"destructionEffect2";
|
||||
while{_int>1}do{
|
||||
_int=_int-1;
|
||||
_t=(random 45)+1;
|
||||
_list=_list+[_t];
|
||||
};
|
||||
{
|
||||
sleep _x;
|
||||
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
|
||||
"SmallSecondary"createvehicle(_v modelToWorld _effect2pos);
|
||||
}foreach(_list);
|
||||
Reference in New Issue
Block a user