Version 1.0
This commit is contained in:
parent
8bbdd93301
commit
5a871c6fd5
23
Epoch.Altis/addons/DBD/autoRun.sqf
Normal file
23
Epoch.Altis/addons/DBD/autoRun.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Start Autorun. Loosely based on ExileMod code.
|
||||
By Ghostrider-DbD-
|
||||
For DeathBeforeDishonorClan
|
||||
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
if (!DBD_AutorunOn) then
|
||||
{
|
||||
_canRun = call DBD_canRun;
|
||||
if (_canRun) then
|
||||
{
|
||||
DBD_AutorunOn = true;
|
||||
hint "Autorun Activated";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
call DBD_stopAutoRun;
|
||||
};
|
||||
|
12
Epoch.Altis/addons/DBD/canRun.sqf
Normal file
12
Epoch.Altis/addons/DBD/canRun.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
Adapted from code written by Exile Mod team.
|
||||
By Ghostrider-DbD-
|
||||
For DeathBeforeDishonorClan
|
||||
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
_canRun = (vehicle player == player && !(surfaceIsWater (getPos player)) && !((damage player) >= 0.5));
|
||||
_canRun
|
||||
|
17
Epoch.Altis/addons/DBD/init.sqf
Normal file
17
Epoch.Altis/addons/DBD/init.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
// Initialize functions for actions controlled by a keypress.
|
||||
// by GhostriderDbD
|
||||
// For DeathbeforeDishonorClan
|
||||
// for Epoch 0.3.8.0 +
|
||||
// Copywrite 2016
|
||||
|
||||
DBD_Autorun = compileFinal preprocessFileLineNumbers "addons\DBD\autoRun.sqf";
|
||||
DBD_stopAutoRun = compileFinal preprocessFileLineNumbers "addons\DBD\stopAutoRun.sqf";
|
||||
DBD_canRun = compileFinal preprocessFileLineNumbers "addons\DBD\canRun.sqf";
|
||||
DBD_keyPress = compileFinal preprocessFileLineNumbers "addons\DBD\keyPressed.sqf";
|
||||
DBD_AutorunOn = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
34
Epoch.Altis/addons/DBD/keyPressed.sqf
Normal file
34
Epoch.Altis/addons/DBD/keyPressed.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Custom Keypress Handler for Arma 3 Epoch
|
||||
By Ghostrider-Db-
|
||||
for DeathbeforeDishonorClan
|
||||
Copywrite 2016
|
||||
Intended to be called from the KeyDown event handler for Epoch 0.3.8 +
|
||||
|
||||
usage:
|
||||
[_dikCode] DBD_keyPress;
|
||||
|
||||
for DIK Codes see: https://resources.bisimulations.com/wiki/DIK_KeyCodes
|
||||
*/
|
||||
|
||||
params ["_dikCode"];
|
||||
|
||||
|
||||
if (_dikCode in [0x09] /* 8 key*/) then {
|
||||
if (DBD_AutorunOn) then {
|
||||
call DBD_stopAutoRun;
|
||||
} else {
|
||||
call DBD_autoRun;
|
||||
};
|
||||
};
|
||||
|
||||
if (_dikCode == 0x06 /* 5 key*/) then {call cm_Earplugs_FUNc};
|
||||
|
||||
if (_dikCode in [0x11,0x1E,0x1F,0x20,0x2C,0x2D,0x2E]) then
|
||||
{
|
||||
call DBD_stopAutoRun;
|
||||
};
|
||||
|
||||
if (_dikCode == 0x16 /* u key */) then {execVM "scripts\ActionMenu\admin_actions\admin_unlock.sqf";};
|
||||
|
||||
if (_dikCode == 0x1B /* R bracket */) then {execVM "addons\Menu\playerMenu.sqf";};
|
21
Epoch.Altis/addons/DBD/stopAutoRun.sqf
Normal file
21
Epoch.Altis/addons/DBD/stopAutoRun.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Adapted from code written by Exile Mod team.
|
||||
By Ghostrider-DbD-
|
||||
For DeathBeforeDishonorClan
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
if (DBD_AutorunOn) then
|
||||
{
|
||||
DBD_AutorunOn = false;
|
||||
if ((vehicle player) isEqualTo player) then
|
||||
{
|
||||
if (alive player) then
|
||||
{
|
||||
hint "Autorun Inactivated";
|
||||
player switchMove "";
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
20
Epoch.Altis/epoch_code/customs/EPOCH_custom_EH_KeyDown.sqf
Normal file
20
Epoch.Altis/epoch_code/customs/EPOCH_custom_EH_KeyDown.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: [Ignatz] He-Man
|
||||
|
||||
Description:
|
||||
Custom A3 Epoch KeyUp Eventhandler
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_EH_KeyDown.sqf
|
||||
*/
|
||||
params ["_display","_dikCode","_shift","_ctrl","_alt"];
|
||||
_handled = false;
|
||||
|
||||
[_dikCode] call DBD_keyPress;
|
||||
|
||||
_handled
|
28
Epoch.Altis/epoch_code/customs/EPOCH_custom_OnEachFrame.sqf
Normal file
28
Epoch.Altis/epoch_code/customs/EPOCH_custom_OnEachFrame.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
Author: Aaron Clark - EpochMod.com
|
||||
|
||||
Contributors: [Ignatz] He-Man
|
||||
|
||||
Description:
|
||||
Custom A3 Epoch OnEachFrame
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/custom/EPOCH_custom_OnEachFrame.sqf
|
||||
*/
|
||||
|
||||
/*
|
||||
This still needs refinement. Some conditions are shown below but need testing.
|
||||
*/
|
||||
|
||||
if (DBD_AutorunOn) then {
|
||||
private _OK_toRun = call DBD_canRun;
|
||||
if (_OK_toRun) then
|
||||
{
|
||||
player playAction "FastF";
|
||||
} else {
|
||||
DBD_AutorunOn = false;
|
||||
};
|
||||
};
|
9
Epoch.Altis/init.sqf
Normal file
9
Epoch.Altis/init.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
Merge the lines below with those in your init.sqf
|
||||
*/
|
||||
|
||||
if(hasInterface) then{
|
||||
execVM "addons\DBD\init.sqf";
|
||||
};
|
||||
|
||||
|
17
INSTALLATION.txt
Normal file
17
INSTALLATION.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Installation:
|
||||
|
||||
/////////////////////////////
|
||||
// MPMissions - modify your mission pbo (epoch.Altis.pbo) as follows.
|
||||
1) Unpack the Zip file you downloaded from the Github to a folder in a convenient location.
|
||||
2) Unpack your mission pbo (epoch.Altis.pbo).
|
||||
3) Open the folder containing the unpacked mission.
|
||||
4) If you have not added any code to the custom KeyDown or onEachFrame event handlers, copy the DBD and epoch_code folders from the download into the folder containing the unpacked mission.
|
||||
If you already use EPOCH_custom_OnEachFrame or EPOCH_custom_EH_KeyDown custom event handlers then carefully merge the code in the downloaded files.
|
||||
5) Merge the line in MPMissions\epoch.Altis\init.sqf with your init.sqf, or use the one provided if you do not have one.
|
||||
6) Repack your mission.pbo.
|
||||
///////////////////////////
|
||||
|
||||
|
||||
Activating Autorun: press the 8 key.
|
||||
|
||||
Linking Autorun to icons on status bars or other HUD: you can easily poll autorun status by checking the status of DBD_AutorunOn
|
7
License.md
Normal file
7
License.md
Normal file
@ -0,0 +1,7 @@
|
||||
--------------------------
|
||||
License
|
||||
--------------------------
|
||||
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
||||
|
||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
|
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
||||
epochmod Autorun Version 1.0 for Epochmod for Arma 3 version 0.5.0 + and Arma 3 V 1.70 +.
|
||||
|
||||
This is a simple script that adds an autorun function to epoch.
|
||||
I have tried to make installation as simple as possible so that this is plug and play.
|
||||
Please see the installation instructions for details regarding adding this to your server.
|
||||
|
||||
--------------------------
|
||||
License
|
||||
--------------------------
|
||||
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
||||
|
||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
Loading…
Reference in New Issue
Block a user