-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add add plate gesture animation (#80)
* Add add plate gesture Special thanks to WebKnight for allowing its usage! * remove rogue char * prepare sound, add missing gesture config * fix first sound playing regardless of letting go of key * add sounds
- Loading branch information
Showing
24 changed files
with
197 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
class ACE_Medical_Injuries { | ||
class damageTypes { | ||
class woundHandlers; | ||
class bullet { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class grenade { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class explosive { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class shell { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class stab { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class punch { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
class unknown { | ||
class woundHandlers: woundHandlers { | ||
ADDON = QFUNC(aceDamageHandler); | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
class CfgMovesBasic { | ||
class ManActions { | ||
GVAR(addPlate_base)= QGVAR(addPlate_base); | ||
GVAR(addPlate_2)= QGVAR(addPlate_2); | ||
GVAR(addPlate_3)= QGVAR(addPlate_3); | ||
GVAR(addPlate_4)= QGVAR(addPlate_4); | ||
GVAR(addPlate_5)= QGVAR(addPlate_5); | ||
GVAR(addPlate_6)= QGVAR(addPlate_6); | ||
GVAR(addPlate_7)= QGVAR(addPlate_7); | ||
GVAR(addPlate_8)= QGVAR(addPlate_8); | ||
GVAR(addPlate_9)= QGVAR(addPlate_9); | ||
GVAR(addPlate_10)= QGVAR(addPlate_10); | ||
GVAR(addPlate_11)= QGVAR(addPlate_11); | ||
GVAR(addPlate_12)= QGVAR(addPlate_12); | ||
GVAR(addPlate_13)= QGVAR(addPlate_13); | ||
GVAR(addPlate_14)= QGVAR(addPlate_14); | ||
GVAR(addPlate_15)= QGVAR(addPlate_15); | ||
GVAR(addPlate_16)= QGVAR(addPlate_16); | ||
GVAR(stopGesture) = QGVAR(stopGesture); | ||
}; | ||
class Actions { | ||
class Default; | ||
class NoActions: ManActions { | ||
GVAR(addPlate_base)[]= {QGVAR(addPlate_base), "Gesture"}; | ||
GVAR(addPlate_2)[]= {QGVAR(addPlate_2), "Gesture"}; | ||
GVAR(addPlate_3)[]= {QGVAR(addPlate_3), "Gesture"}; | ||
GVAR(addPlate_4)[]= {QGVAR(addPlate_4), "Gesture"}; | ||
GVAR(addPlate_5)[]= {QGVAR(addPlate_5), "Gesture"}; | ||
GVAR(addPlate_6)[]= {QGVAR(addPlate_6), "Gesture"}; | ||
GVAR(addPlate_7)[]= {QGVAR(addPlate_7), "Gesture"}; | ||
GVAR(addPlate_8)[]= {QGVAR(addPlate_8), "Gesture"}; | ||
GVAR(addPlate_9)[]= {QGVAR(addPlate_9), "Gesture"}; | ||
GVAR(addPlate_10)[]= {QGVAR(addPlate_10), "Gesture"}; | ||
GVAR(addPlate_11)[]= {QGVAR(addPlate_11), "Gesture"}; | ||
GVAR(addPlate_12)[]= {QGVAR(addPlate_12), "Gesture"}; | ||
GVAR(addPlate_13)[]= {QGVAR(addPlate_13), "Gesture"}; | ||
GVAR(addPlate_14)[]= {QGVAR(addPlate_14), "Gesture"}; | ||
GVAR(addPlate_15)[]= {QGVAR(addPlate_15), "Gesture"}; | ||
GVAR(addPlate_16)[]= {QGVAR(addPlate_16), "Gesture"}; | ||
GVAR(stopGesture)[] = {QGVAR(stopGesture), "Gesture"}; | ||
}; | ||
}; | ||
}; | ||
|
||
#define ADDPLATE(SECONDS) \ | ||
class TRIPLES(ADDON,addPlate,SECONDS): GVAR(addPlate_base) { \ | ||
speed = QUOTE(-SECONDS + 0.5); \ | ||
} | ||
|
||
class CfgGesturesMale { | ||
class Default; | ||
class States { | ||
class GVAR(addPlate_base): Default { | ||
speed = 0; | ||
looped = 0; | ||
file = QPATHTOF(anims\add_plate.rtm); | ||
mask = "handsWeapon"; | ||
headBobStrength = -1; | ||
headBobMode = 4; | ||
disableWeapons = 1; | ||
interpolationRestart = 2; | ||
leftHandIKCurve[] = {0.01,1,0.1,0,0.94,0,0.98,1}; | ||
rightHandIKBeg = 1; | ||
leftHandIKEnd = 1; | ||
rightHandIKCurve[] = {1}; | ||
weaponIK = 1; | ||
canReload = 0; | ||
}; | ||
ADDPLATE(2); | ||
ADDPLATE(3); | ||
ADDPLATE(4); | ||
ADDPLATE(5); | ||
ADDPLATE(6); | ||
ADDPLATE(7); | ||
ADDPLATE(8); | ||
ADDPLATE(9); | ||
ADDPLATE(10); | ||
ADDPLATE(11); | ||
ADDPLATE(12); | ||
ADDPLATE(13); | ||
ADDPLATE(14); | ||
ADDPLATE(15); | ||
ADDPLATE(16); | ||
class GestureNod; | ||
class GVAR(stopGesture): GestureNod { | ||
file = "a3\anims_f\data\anim\sdr\gst\gestureEmpty.rtm"; | ||
disableWeapons = 0; | ||
disableWeaponsLong = 0; | ||
enableOptics = 1; | ||
mask = "empty"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "script_component.hpp" | ||
params ["_player", ["_add", true]]; | ||
|
||
// easier editing when adding new gesture speeds | ||
#define MIN 2 | ||
#define MAX 16 | ||
|
||
// prevent gesture eating your current mag when reloading | ||
if (missionNamespace getVariable ["ace_common_isReloading", false]) exitWith {}; | ||
if (_add) then { | ||
private _seconds = (floor GVAR(timeToAddPlate)) min MAX; | ||
if (_seconds < MIN) exitWith {}; | ||
_player playActionNow (format [QGVAR(addPlate_%1), _seconds]); | ||
|
||
// prevent button spam for sound | ||
_player setVariable [QGVAR(gestureStart), cba_missionTime]; | ||
if ((_player getVariable [QGVAR(nextGestureSound), -1]) < cba_missionTime) then { | ||
_player setVariable [QGVAR(nextGestureSound), cba_missionTime + (_seconds * 0.15) + 1]; | ||
[{ | ||
params ["_player", "_gestureTime"]; | ||
if ((_player getVariable [QGVAR(gestureStart), -1]) isNotEqualTo _gestureTime) exitWith {}; | ||
playSound3D [format [QPATHTO_R(sounds\platesOpen%1.ogg), floor random 4], _player, false, getPosASL _player, 0.75, 1, 7]; | ||
}, [_player, cba_missionTime], _seconds * 0.15] call CBA_fnc_waitAndExecute; | ||
}; | ||
|
||
if (_seconds > 3) then { | ||
[{ | ||
params ["_player", "_gestureTime"]; | ||
if ((_player getVariable [QGVAR(gestureStart), -1]) isNotEqualTo _gestureTime) exitWith {}; | ||
playSound3D [format [QPATHTO_R(sounds\platesMid%1.ogg), floor random 4], _player, false, getPosASL _player, 1, 1, 7]; | ||
}, [_player, cba_missionTime], _seconds * 0.55] call CBA_fnc_waitAndExecute; | ||
}; | ||
|
||
[{ | ||
params ["_player", "_gestureTime"]; | ||
if ((_player getVariable [QGVAR(gestureStart), -1]) isNotEqualTo _gestureTime) exitWith {}; | ||
playSound3D [format [QPATHTO_R(sounds\platesClose%1.ogg), floor random 4], _player, false, getPosASL _player, 0.75, 1, 7]; | ||
}, [_player, cba_missionTime], _seconds * 0.75] call CBA_fnc_waitAndExecute; | ||
} else { | ||
_player playActionNow QGVAR(stopGesture); | ||
_player setVariable [QGVAR(gestureStart), nil]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ Contributors: | |
audiocustoms | ||
Alacrritas | ||
Alien314 | ||
WebKnight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ files = [ | |
"*.paa", | ||
"LICENSE", | ||
"readme.txt", | ||
"authors.txt", | ||
"readme.md" | ||
] | ||
include = ["./include"] | ||
|