Hallo.
Hat vielleicht jemand ein Script womit ich das Farmen mit der Spitzhacke auf eine Taste legen kann für 4.4?
Danke.

Farmen mit Spitzhacke auf Taste!
-
Zotti -
30. April 2016 um 14:10 -
Geschlossen
-
-
Niemand eine Lösung für mich ?
Immer Z drücken und die Spitzhacke benutzen ist nicht so prickelnd mit der Zeit. -
keiner der weiss wie es geht ?
-
Den Code einfach in den core/functions/fn_keyHandler.sqf eintragen.
Code
Alles anzeigen//Q Key case 16: { if((!life_action_inUse) && (vehicle player == player) ) then { { _str = [_x] call life_fnc_varToStr; _val = missionNameSpace getVariable _x; if(_val > 0 ) then { if( _str == "Spitzhacke" || _str == "pickaxe" ) then { [] spawn life_fnc_pickAxeUse; }; }; } foreach life_inv_items; } };
-
getestet mit der pickaxe aber geht nicht auf version 4.4
-
Aso sry, Habe das überlesen mit der ver. 4.4. Ich arbeite leider nur mit der 3.1.4.8
Sry frag wenn anders
-
Code
Alles anzeigenif(EQUAL(playerSide,civilian)) then { if((!life_action_gather) && (vehicle player == player)) then { { _item = configName _x; _str = M_CONFIG(getText,"VirtualItems",_item,"variable"); _val = ITEM_VALUE(_item); if(_val > 0 ) then { if(_str == "pickaxe") then { [] spawn life_fnc_pickAxeUse; }; }; } foreach ("true" configClasses (missionConfigFile >> "VirtualItems")); }; };
-
Funktioniert problemlos in der AL 4.3 & AL 4.4
Code: core/functions/fn_Keyhandler.sqf//Q Key (Pickaxe) case 16: { if ((life_inv_pickaxe >0) && (vehicle player == player) && !life_action_pickaxeInUse) then {[] spawn life_fnc_pickaxeUse;}; };
Code: core/items/fn_pickaxeUse.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_pickaxeUse.sqf Author: Bryan "Tonic" Boardwine Description: Main functionality for pickaxe in mining. */ closeDialog 0; private["_mine","_itemWeight","_diff","_itemName"]; _mine = ""; switch (true) do { case (player distance (getMarkerPos "lead_1") < 30): {_mine = ["copper_unrefined",2];}; case (player distance (getMarkerPos "iron_1") < 30): {_mine = ["iron_unrefined",2];}; case (player distance (getMarkerPos "salt_1") < 120) : {_mine = ["salt_unrefined",4];}; case (player distance (getMarkerPos "sand_1") < 75) : {_mine = ["sand",5];}; case (player distance (getMarkerPos "diamond_1") < 50): {_mine = ["diamond_uncut",_anzahl];}; case (player distance (getMarkerPos "oil_1") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "oil_2") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "rock_1") < 50): {_mine = ["rock",2];}; default {""}; }; //Mine check if(EQUAL(_mine,"")) exitWith {hint localize "STR_ISTR_Pick_NotNear"}; if(vehicle player != player) exitWith {hint localize "STR_ISTR_Pick_MineVeh";}; _diff = [SEL(_mine,0),SEL(_mine,1),life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff; if(EQUAL(_diff,0)) exitWith {hint localize "STR_NOTF_InvFull"}; if (life_action_pickaxeInUse) exitWith {hint "Du baust schon ab!"}; life_action_pickaxeInUse = true; life_action_inUse = true; for "_i" from 0 to 2 do { player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";}; sleep 2.5; }; if(([true,SEL(_mine,0),_diff] call life_fnc_handleInv)) then { _itemName = M_CONFIG(getText,"VirtualItems",SEL(_mine,0),"displayName"); titleText[format[localize "STR_ISTR_Pick_Success",(localize _itemName),_diff],"PLAIN"]; }; life_action_inUse = false; life_action_pickaxeInUse = false;
-
Funktioniert problemlos in der AL 4.3 & AL 4.4
Code: core/functions/fn_Keyhandler.sqf//Q Key (Pickaxe) case 16: { if ((life_inv_pickaxe >0) && (vehicle player == player) && !life_action_pickaxeInUse) then {[] spawn life_fnc_pickaxeUse;}; };
Code: core/items/fn_pickaxeUse.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_pickaxeUse.sqf Author: Bryan "Tonic" Boardwine Description: Main functionality for pickaxe in mining. */ closeDialog 0; private["_mine","_itemWeight","_diff","_itemName"]; _mine = ""; switch (true) do { case (player distance (getMarkerPos "lead_1") < 30): {_mine = ["copper_unrefined",2];}; case (player distance (getMarkerPos "iron_1") < 30): {_mine = ["iron_unrefined",2];}; case (player distance (getMarkerPos "salt_1") < 120) : {_mine = ["salt_unrefined",4];}; case (player distance (getMarkerPos "sand_1") < 75) : {_mine = ["sand",5];}; case (player distance (getMarkerPos "diamond_1") < 50): {_mine = ["diamond_uncut",_anzahl];}; case (player distance (getMarkerPos "oil_1") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "oil_2") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "rock_1") < 50): {_mine = ["rock",2];}; default {""}; }; //Mine check if(EQUAL(_mine,"")) exitWith {hint localize "STR_ISTR_Pick_NotNear"}; if(vehicle player != player) exitWith {hint localize "STR_ISTR_Pick_MineVeh";}; _diff = [SEL(_mine,0),SEL(_mine,1),life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff; if(EQUAL(_diff,0)) exitWith {hint localize "STR_NOTF_InvFull"}; if (life_action_pickaxeInUse) exitWith {hint "Du baust schon ab!"}; life_action_pickaxeInUse = true; life_action_inUse = true; for "_i" from 0 to 2 do { player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";}; sleep 2.5; }; if(([true,SEL(_mine,0),_diff] call life_fnc_handleInv)) then { _itemName = M_CONFIG(getText,"VirtualItems",SEL(_mine,0),"displayName"); titleText[format[localize "STR_ISTR_Pick_Success",(localize _itemName),_diff],"PLAIN"]; }; life_action_inUse = false; life_action_pickaxeInUse = false;
Nein, das ist nicht die 4.4, da die Namen der Marker der Minen nicht die richtigen sind.
Hier das, was du wirklich ändern musst:Code: core/functions/fn_keyHandler.sqf//Q Key (Pickaxe) case 16: { if ((life_inv_pickaxe >0) && (vehicle player == player) && !life_action_pickaxeInUse) then {[] spawn life_fnc_pickaxeUse;}; };
Spoiler anzeigen
Code: core/items/fn_pickaxeUse.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_pickaxeUse.sqf Author: Bryan "Tonic" Boardwine Description: Main functionality for pickaxe in mining. */ closeDialog 0; private["_mine","_itemWeight","_diff","_itemName"]; _mine = ""; switch (true) do { case (player distance (getMarkerPos "copper_mine") < 30): {_mine = ["copper_unrefined",2];}; case (player distance (getMarkerPos "iron_mine") < 30): {_mine = ["iron_unrefined",2];}; case (player distance (getMarkerPos "salt_mine") < 120) : {_mine = ["salt_unrefined",4];}; case (player distance (getMarkerPos "sand_mine") < 75) : {_mine = ["sand",5];}; case (player distance (getMarkerPos "diamond_mine") < 50): {_mine = ["diamond_uncut",1];}; case (player distance (getMarkerPos "oil_field_1") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "oil_field_2") < 40) : {_mine = ["oil_unprocessed",1];}; case (player distance (getMarkerPos "rock_quarry") < 50): {_mine = ["rock",2];}; default {""}; }; //Mine check if(EQUAL(_mine,"")) exitWith {hint localize "STR_ISTR_Pick_NotNear"}; if(vehicle player != player) exitWith {hint localize "STR_ISTR_Pick_MineVeh";}; _diff = [SEL(_mine,0),SEL(_mine,1),life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff; if(EQUAL(_diff,0)) exitWith {hint localize "STR_NOTF_InvFull"}; life_action_pickaxeInUse = true; life_action_inUse = true; for "_i" from 0 to 2 do { player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";}; sleep 2.5; }; if(([true,SEL(_mine,0),_diff] call life_fnc_handleInv)) then { _itemName = M_CONFIG(getText,"VirtualItems",SEL(_mine,0),"displayName"); titleText[format[localize "STR_ISTR_Pick_Success",(localize _itemName),_diff],"PLAIN"]; }; life_action_inUse = false; life_action_pickaxeInUse = false;
-
Dann ändere die mit deinem Marker Namen. Nicht nur immer Copy Paste machen, auch mal überlegen !
-
Das ist mir durchaus klar, immerhin hab ich ja das ganze auch abgeändert und hier reingestellt. Nicht für mich - wie man unschwer feststellen kann hab ich ja bereits das richtige drin - sondern auch für andere, die das vll lesen und dann auf Probleme stoßen. Diese will ich nur vermeiden.
-
Und für Aktionstaste 10 dann so?
Code
Alles anzeigen//Hotfix for Interaction key not being able to be bound on some operation systems. if(!(EQUAL(count (actionKeys "User10"),0)) && {(inputAction "User10" > 0)}) exitWith { //Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10) if(!life_action_inUse) then { [] spawn { private "_handle"; _handle = [] spawn life_fnc_actionKeyHandler; waitUntil {scriptDone _handle}; life_action_inUse = false; }; }; } else { { if ((life_inv_pickaxe >0) && (vehicle player == player) && !life_action_pickaxeInUse) then {[] spawn life_fnc_pickaxeUse;}; }; true; };
-
Also, wenn ich das so einfüge mit case 16, was die Q Taste wäre, funktioniert dies nicht. Ich schau nochmal drüber.
Code
Alles anzeigencase 16: { if ((life_inv_pickaxe >0) && > 13:09:08 Error position: <case 16: { if ((life_inv_pickaxe >0) && > 13:09:08 Error Fremdfehler: Invalid switch block 13:09:08 File mpmissions\__CUR_MP.Altis\core\functions\fn_keyHandler.sqf, line 284 13:09:08 Error in expression <spawn life_fnc_MP; }; }; }; }; }; };
-
-
Dann benutzt du aber immer die Spitzhacke, nicht nur wenn du eine Spitzhacke im Inventar hast
-
Alles andere geht aber nicht. Das andere ist ja mit der aktionstaste 10 belegt
-
Also bei mir funktioniert es problemlos auf der Q-Taste
-
werde es bei mir mal probieren, hab auch die V4.4 und dann mal schauen
-
-
nox
25. März 2023 um 00:47 Hat das Thema aus dem Forum Hilfeforum - ArmA 3 nach Archiv verschoben.