Files
DayZ-Epoch/dayz_code/actions/fill_startGenerator.sqf
vbawol 3cbb79051e 1.0.0.7 Developer Build
+ [CHANGED] Build-ables now get deleted from database when killed.
+ [ADDED] Basic fishing on ocean using toolbelt item: ItemFishingPole.
TODO: add model
+ [ADDED] New way of chopping down trees that actually takes into
account the size of the tree for number of chops/output. For example
medium sized tree will typically require 3 animations and will yield 3
wood piles.
+ [ADDED] Airplane dealer to Namalsk and updated trader config.
+ [CHANGED] Can now remove park bench with refund.
+ [FIXED] dayz_maxGlobalZombies was not incrementing when other players
are within 400m. Also, variable was overwritten in player_spawncheck
code so a init variable was added dayz_maxGlobalZombiesInit (default=40)
as well as dayz_maxGlobalZombiesIncrease (default=10) to control the
amount of increase for each additional player within range.
+ [CHANGED] Any backpack placed on the ground will with gear will now
disappear to all other players.
+ [FIXED] Added 5 second sleep to swimming in ground fix, now it should
actually work without glitching. fixes #326
+ [CHANGED] To prevent lost primary weapons in backpacks, all backpacks
have been Upgraded. This requires that backpacks the weapon to magazines
ratio be within 1:10. http://dayzepoch.com/wiki/index.php/Backpacks
+ [CLEANUP] disable debug of player zombie vision.
+ [ADDED] ASC EU Lights Mod FROM
http://www.armaholic.com/page.php?id=12076
+ [ADDED] New Craft-able light_pole_kit and Build-able LightPole_DZ for
night lighting. RECIPE 4 lumber + 1 scrap + 1 Light Bulb
+ [ADDED] MAP Editorupgrade (EU) @MAP Mod FROM
http://www.armaholic.com/page.php?id=6194
+ [CHANGED] Picking up crowbar now gives toolbelt item instead of melee
weapon.
2013-05-04 15:21:57 -05:00

91 lines
2.3 KiB
Plaintext

private ["_vehicle","_started","_finished","_animState","_isMedic"];
if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] };
TradeInprogress = true;
player removeAction s_player_fillgen;
s_player_fillgen = 1;
// Use target from addaction
_vehicle = _this select 3;
// force animation
player playActionNow "Medic";
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
cutText ["Preparing to fuel and start generator, move to cancel.", "PLAIN DOWN"];
[player,50,true,(getPosATL player)] spawn player_alertZombies;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if(!_finished) then {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
cutText ["Canceled." , "PLAIN DOWN"]
};
if (_finished) then {
// take jerry can and replace with empty
if(!(_vehicle getVariable ["GeneratorFilled", false]) and ("ItemJerrycan" in magazines player)) then {
if(([player,"ItemJerrycan"] call BIS_fnc_invRemove) == 1) then {
player addMagazine "ItemJerrycanEmpty";
// mark as once filled
_vehicle setVariable ["GeneratorFilled", true,true];
// Start generator
_vehicle setVariable ["GeneratorRunning", true,true];
// Sound_Generator1
// Looks like this was the entended way of making the sound, lets test
_soundSource = createSoundSource ["Sound_Generator1", position player, [], 0];
_vehicle setVariable ["GeneratorSound", _soundSource,true];
// TODO: Add running sounds to generator
cutText ["Generator has been started.", "PLAIN DOWN"];
};
} else {
// Start generator
_vehicle setVariable ["GeneratorRunning", true,true];
// Sound_Generator1
// Looks like this was the entended way of making the sound, lets test
_soundSource = createSoundSource ["Sound_Generator1", position player, [], 0];
_vehicle setVariable ["GeneratorSound", _soundSource,true];
// TODO: Add running sounds to generator
cutText ["Generator has been started.", "PLAIN DOWN"];
};
};
TradeInprogress = false;
s_player_fillgen = -1;