Moin moin
habe mal eine Frage hin sich Farmen
Also wir haben ein paar Sachen da braucht man eine Schaufel, eine Holzaxt oder Handschuhe.
So das der Text kommt du Brauchst da für ..... habe ich schon gefunden wie ich das mache
so nun frage ich m ich wie macht man es das man neuen Sound bei der Holzaxt hat und das nicht der sound von der Pike kommt
Wenn wer an kommt mit FN_gather.sqf und sagt so
switch (_requiredItem) do {
case "pickaxe": {player say3D "mining";};
case "Schaufel": {player say3D "harvest";};
case "Holzaxt": {player say3D "harvest";};
case "Handschuhe": {player say3D "harvest";};
default {player say3D "harvest";};
};
Also das geht schon mal nicht das habe ich schon versucht wo ich das in ein Post gesehen habe
habe in der fn_mine schon was gefunden was im Verbindung mit den sounds steht und habe mal was getestet aber da kommen die sounds leider nach einander =/ kann mir wer da helfen ?
hier ein mal meine fn_mine mit denn test
#include "..\..\script_macros.hpp"
/*
File: fn_mine.sqf
Author: Devilfloh
Editor: Dardo
Description:
Same as fn_gather,but it allows use of probabilities for mining.
*/
private ["_maxGather", "_resource", "_amount", "_requiredItem", "_mined"];
if (life_action_inUse) exitWith {};
if !(isNull objectParent player) exitWith {};
if (player getVariable "restrained") exitWith {
hint localize "STR_NOTF_isrestrained";
};
_exit = false;
if (player getVariable "playerSurrender") exitWith {
hint localize "STR_NOTF_surrender";
};
life_action_inUse = true;
_zone = "";
_requiredItem = "";
_resourceCfg = missionConfigFile >> "CfgGather" >> "Minerals";
_percent = (floor random 100) + 1; //Make sure it's not 0
for "_i" from 0 to count(_resourceCfg)-1 do {
_curConfig = _resourceCfg select _i;
_resources = getArray(_curConfig >> "mined");
_maxGather = getNumber(_curConfig >> "amount");
_zoneSize = getNumber(_curConfig >> "zoneSize");
_resourceZones = getArray(_curConfig >> "zones");
_requiredItem = getText(_curConfig >> "item");
_mined = "";
if (_resources isEqualTo []) exitWith {}; //Smart guy :O
for "_i" from 0 to count (_resources) do {
if (count _resources isEqualTo 1) exitWith {
if (!((_resources select 0) isEqualType [])) then {
_mined = _resources select 0;
} else {
_mined = (_resources select 0) select 0;
};
};
_resource = (_resources select _i) select 0;
_prob = (_resources select _i) select 1;
_probdiff = (_resources select _i) select 2;
if ((_percent >= _prob) && (_percent <= _probdiff)) exitWith {
_mined = _resource;
};
};
{
if ((player distance(getMarkerPos _x)) < _zoneSize) exitWith {
_zone = _x;
};
} forEach _resourceZones;
if (_zone != "") exitWith {};
};
if (_zone isEqualTo "") exitWith {
life_action_inUse = false;
};
if (_requiredItem != "") then {
_valItem = missionNamespace getVariable "life_inv_" + _requiredItem;
if (_valItem < 1) exitWith {
switch (_requiredItem) do {
case "pickaxe": {
titleText[(localize "STR_NOTF_Pickaxe"), "PLAIN"];
};
};
life_action_inUse = false;
_exit = true;
};
};
if (_requiredItem != "") then {
_valItem = missionNamespace getVariable "life_inv_" + _requiredItem;
if (_valItem < 1) exitWith {
switch (_requiredItem) do {
case "Schaufel": {
titleText[(localize "STR_NOTF_Schaufel"), "PLAIN"];
};
};
life_action_inUse = false;
_exit = true;
};
};
if (_requiredItem != "") then {
_valItem = missionNamespace getVariable "life_inv_" + _requiredItem;
if (_valItem < 1) exitWith {
switch (_requiredItem) do {
case "Holzaxt": {
titleText[(localize "STR_NOTF_Holzaxt"), "PLAIN"];
};
};
life_action_inUse = false;
_exit = true;
};
};
if (_requiredItem != "") then {
_valItem = missionNamespace getVariable "life_inv_" + _requiredItem;
if (_valItem < 1) exitWith {
switch (_requiredItem) do {
case "Handschuhe": {
titleText[(localize "STR_NOTF_Handschuhe"), "PLAIN"];
};
};
life_action_inUse = false;
_exit = true;
};
};
if (_exit) exitWith {
life_action_inUse = false;
};
_amount = round(random(_maxGather)) + 1;
_diff = [_mined, _amount, life_carryWeight, life_maxWeight] call life_fnc_calWeightDiff;
if (_diff isEqualTo 0) exitWith {
hint localize "STR_NOTF_InvFull";
life_action_inUse = false;
};
player say3D "mining";
for "_i" from 0 to 4 do {
player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil {
animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
};
sleep 0.5;
};
player say3D "nachricht";
for "_i" from 0 to 4 do {
player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil {
animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
};
sleep 0.5;
};
player say3D "harvest";
for "_i" from 0 to 4 do {
player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil {
animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
};
sleep 0.5;
};
if (([true, _mined, _diff] call life_fnc_handleInv)) then {
_itemName = M_CONFIG(getText, "VirtualItems", _mined, "displayName");
titleText[format [localize "STR_NOTF_Mine_Success", (localize _itemName), _diff], "PLAIN"];
};
sleep 2.5;
life_action_inUse = false;
Alles anzeigen
habe mal die _mine und die _gather mal mit hoch geladen
bedanke mich jetzt schon mal für eure Hilfe ♥