1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Downloads
  4. Galerie
    1. Alben
  5. Toolbox
    1. Passwort Generator
    2. Portchecker
  6. Mitglieder
    1. Mitgliedersuche
    2. Benutzer online
    3. Trophäen
    4. Team
Mo: 19 Mai 2025
  • Anmelden oder registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Dateien
  • Seiten
  • Bilder
  • Erweiterte Suche

Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.

Anmelden oder registrieren
    1. Nodezone.net Community
    2. Forum
    3. Gameserver & Hosting
    4. ArmA Series - ArmA 3 / Reforger
    5. Tutorials & Releases

    [Tutorial] Hunde in Altis Life (Mit Video)

      • Altis Life
    • ChickenWeed
    • 11. August 2016 um 10:33
    • Saturin78
      Profi
      Reaktionen
      409
      Trophäen
      10
      Beiträge
      1.340
      • 4. September 2017 um 17:43
      • #81

      Hallole zusammen,

      das hier ist zwar ein recht altes System, aber hab es mal in der aktuellen Altis Life 5.0.0 ausprobiert. Es musste noch ne kleine remoteExec Anpassung gemacht werden, aber soweit geht es mal. Also es erscheint der Vierbeiner ( random ), es werden die 5000,- Kaufpreis abgezogen und die Sounds spielen ab. Aber, es erscheinen dauernd Fehler die per -showScriptErrors angezeigt werden.

      Fehler beim Kauf des Hundes

      17:32:11 Error in expression <ns";

      {

      _unit removeaction _x;

      } foreach _actions;

      _actions = [ ];

      if ((_unit ge>

      17:32:11 Error position: <_actions;

      _actions = [ ];

      if ((_unit ge>

      17:32:11 Error Nicht definierte Variable in Ausdruck: _actions

      17:32:11 File mpmissions\__CUR_MP.Altis\dogfunctions.sqf, line 292

      Fehler beim spawnen des Hundes

      17:32:18 Error in expression <_soundToPlay = _soundPath + "sounds\" + _sound + ".ogg";

      publicvariable "sound";>

      17:32:18 Error position: <_sound + ".ogg";

      publicvariable "sound";>

      17:32:18 Error Nicht definierte Variable in Ausdruck: _sound

      17:32:18 File mpmissions\__CUR_MP.Altis\dogfunctions.sqf, line 238

      Meine Datei sieht folgendermaßen aus:

      C: dogfunctions.sqf
      #include "script_macros.hpp"
      /*
      dog functions
      
      pass in the calling unit
      
      made by: 
      |TG-355th| Yink
      
      NPC_Init:  this addAction ["Hund kaufen",life_fnc_dogFunctions,[(_this select 1)]];
      */
      
      if(life_cash < 5000) exitWith{hint("Du hast keine 5000,- Altis $ um einen Hund zu kaufen!");};
      life_cash = life_cash - 5000;
      
      private["_sounds","_sound","_actions","_dog","_randomDog"];
      _unit = _this select 0;
      _side = side _unit;
      sleep 2;
      _setVariable = {
          _unit setvariable ["order","nil"];
          _unit setvariable ["step","wait"];
          _unit setvariable ["action","true"];
          _unit setvariable ["seek","false"];
      };
      
      _dogRevive = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
      
          sleep 5;
      
          _side = side _unit;
          _unit setvariable ["follow",'false'];
          _tempPos = getpos _unit;
          _group1 = createGroup _side;
      
          _randomDog = ["Fin_sand_F","Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Fin_random_F","Alsatian_Sand_F","Alsatian_Black_F","Alsatian_Sandblack_F","Alsatian_Random_F"];// call BIS_fnc_selectRandom;
          _randomDog1 = _randomDog call BIS_fnc_selectRandom;
          _dog = _randomDog1 createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];    //"dog = this"
          //"Alsatian_Sandblack_F" createUnit [_tempPos,_group1,"_unit setvariable ['dog',format['%1',this]]", 1.0, "private"];
          sleep 0.5;
      
          _dog = _unit getvariable "dog";
          _unit setvariable ["step","go"];
      };
      
      _dogWhistle = {
          _unit = (_this select 3) select 0;
          _growl = (_this select 3) select 1;
          play = (_this select 3) select 2;
          _idle = (_this select 3) select 3;
          _vehicle = (_this select 3) select 4;
          _sound = ["whistle",_unit, 20] spawn play;
          hint "Jessie, here girl!";
          sleep 1;
          _unit setvariable ["follow",'false'];
          _tempPos = [(getpos _unit) select 0,((getpos _unit) select 1) + 1,0];
          _side = side _unit;
      
          _group1 = createGroup _side;
      
          _randomDog = ["Fin_sand_F","Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Fin_random_F","Alsatian_Sand_F","Alsatian_Black_F","Alsatian_Sandblack_F","Alsatian_Random_F"];// call BIS_fnc_selectRandom;
          _randomDog1 = _randomDog call BIS_fnc_selectRandom;
          _dog = _randomDog1 createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];
          //_dog = "Alsatian_Sandblack_F" createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];
      
          _unit setvariable ["order","idle"];
          _unit setvariable ["step","go"];
          _unit setvariable ["dog", dog];
          (_unit getvariable "dog") setvariable ["player",_unit];
      
          _vehicle    = [_unit,play] spawn _vehicle;
          _return    = [_unit,play] spawn _idle;
          _growl = [_unit,play] spawn _growl;
          killed = {
              _unit1 = (_this select 0) getvariable "player";
              _unit1 setvariable ["order","dead"];
              _unit setvariable ["action","false"];
              _unit1 setvariable ["step","go"];
          };
      
          shot_at = {
              _dog = _this select 0;
              _firer = _this select 1;
              _unit1 = _dog getvariable "player";
              _side = east;
      
              if (((side _firer)==east)&&((_unit1 getvariable "seek")=="true")) then {
                  _unit1 setVariable ["order","idle"];
                  _unit1 setVariable ["step","go"];
                  _unit1 setVariable ["seek","false"];
                  _dog doMove (getpos _unit1);
                  _sound = ["dog_whine",_dog, 20] spawn play;
              };
          };
      
          (_unit getvariable "dog") addeventhandler
          [
              "killed",
              { 
                  _script = [(_this select 0)] call killed;
              }
          ];
      
          (_unit getvariable "dog") addeventhandler
          [
              "FiredNear",
              {
                  _script = [(_this select 0),(_this select 1)] call shot_at;
              }
          ];    
      };
      
      _dogFollow = {
          _unit = (_this select 3) select 0;
          _dog    = _unit getvariable "dog";
          _play    = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          hint "Jessie, follow!";
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
          _unit setvariable ["follow",'true'];
      
          while {(_unit getvariable "follow") == 'true'} do  {
              sleep 0.5;
              if ((_dog distance _unit) < 4) then {
                  _dog domove getpos _dog;
              } else {
                  _dog domove getpos _unit;    
              };
              sleep 1;
          };
      };
      
      _dogSeek = {
          _unit = (_this select 3) select 0;
          _unit setvariable ["follow",'false'];
          _unit setvariable ["seek","true"];
          _dog = _unit getvariable "dog";
          _play = (_this select 3) select 1;
          hint "Jessie, seek!";
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
          _dog = _unit getvariable "dog";
          _side = east;
          _radius = 1000;
      
          _nearestunits = nearestObjects [_dog,["Man"],_radius];
          _nearestunitofside = [];
      
          if(_side countSide _nearestunits > 0) then {
              _sound = ["dog_one",_dog, 20] spawn _play;
              {
                  _unit = _x;
                  if (side _unit == _side) then {
                      _nearestunitofside = _nearestunitofside + [_unit]
                  };
              } foreach _nearestunits;
          } else {
              _sound = ["dog_ruff",_dog, 20] spawn _play;
              _unit setvariable ["order","idle"];
          };
      
          _dog domove getpos (_nearestunitofside select 0);
          waituntil {(_dog distance (_nearestunitofside select 0))<10};
          _sound = ["dog_ruff",_dog, 20] spawn _play;
      
      };
      
      _dogHeel = {
          _unit = (_this select 3) select 0;
          _dog = _unit getvariable "dog";
          _play = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          hint "Jessie, Heal!";
          _unit setvariable ["follow",'false'];
          _dog = _unit getvariable "dog";
      
          _dog domove [(getpos _unit) select 0,((getpos _unit) select 1) - 1, 0];
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
      };
      
      _dogHide = {
          _unit = (_this select 3) select 0;
          _dog = _unit getvariable "dog";
          _unit setvariable ["follow",'false'];
          _dog = _unit getvariable "dog";
          hint "Jessie, Hide!";
          _unit setvariable ["order","nil"];
          _unit setvariable ["step","go"];
          sleep 3;
          deleteVehicle _dog;
      };
      
      _dogStop = {
          _unit = (_this select 3) select 0;
          _dog = _unit getVariable "dog";
          _play = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          _unit setvariable ["seek","false"];
          hint "Jessie, Hold!";
          _unit setvariable ["follow",'false'];
          _dog domove getpos _dog;
          _unit setvariable ["order","idle"];
          _unit setvariable ["step","go"];
      };
      
      _dogGrowl = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
          _side = east;
          while {alive _dog} do {
              _timer = round(random 5);
              _timer    = _timer + 5;
              _objs = nearestobjects [_dog,["Man"], 50];
              {
                  if ((side _x)!=_side) then {
                      _objs = _objs - [_x];
                  };
              } foreach _objs;
              if ((count _objs)>0) then {
                  _play = _this select 1;
                  _sound = ["dog_growl",_dog, 11] spawn _play;
              };
      
              sleep _timer;
              _dog = _unit getvariable "dog";
          };
      };
      
      _playSound = {
          _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
          sound = _this select 0;
          dog1 = _this select 1;
          _volume = _this select 2;
          _soundToPlay = _soundPath + "sounds\" + _sound + ".ogg";
          publicvariable "sound";
          publicvariable "dog1";
          [dog1 say3d sound] remoteExec ["bis_fnc_spawn",true];
          //[{dog1 say3d sound},"bis_fnc_spawn",true] spawn bis_fnc_mp;
          //_null = [[_sountToPlay,_dog],"sound_fnc",true,true] spawn BIS_fnc_MP;
          //_sound = ["hey",_unit getvariable "dog"] call _playSound;
      };
      
      _dogReturnIdle = {
          _unit = _this select 0;
          _dog    = _unit getvariable "dog";
          _play = _this select 1;
          while {alive _dog} do {
              waituntil {(((_dog distance _unit)>30)&&((_unit getvariable "order")=="idle"))};
              _dog domove (getpos _unit);
              _sound = ["dog_whine",_dog, 20] spawn _play;
              waituntil {unitReady _dog};
          };
      };
      
      _dogVehicle = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
          while {alive _dog} do {
              waituntil {(((vehicle _unit)!= _unit)&&((_dog distance _unit)<8))};
              _veh = vehicle _unit;
              _dog attachto [_unit,[0,0.1,-0.2]];
              _dog attachto [_veh];
              waituntil {(vehicle _unit)!= _veh};
              detach _dog;
              _dog setpos [((getpos _unit) select 0) + 2,((getpos _unit) select 1) + 2,0];
          };
      };
      
      _actions = {
          _unit = _this select 0;
          _dogWhistle    = _this select 1;
          _dogFollow = _this select 2;
          _dogSeek = _this select 3;
          _dogHide = _this select 4;
          _dogHeel = _this select 5;
          _dogStop    = _this select 6;
          _dogGrowl = _this select 7;
          _playSound    = _this select 8;
          _dogReturnIdle = _this select 9;
          _dogVehicle    = _this select 10;
          _unit setvariable ["action","true"];
      
          while {(_unit getvariable "action")=="true"} do {
              _unit setvariable ["step","wait"];
              _actions = _unit getvariable "actions";
              {
                  _unit removeaction _x;
              } foreach _actions;
              _actions = [ ];
          
              if ((_unit getvariable "order") == "nil") then {
                  _whistle = _unit addAction ["Whistle", _dogWhistle, [_unit, _dogGrowl,_playSound,_dogReturnIdle,_dogVehicle]];
                  _unit setvariable ["order","whistle"];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_whistle]];
              };
      
              if ((_unit getvariable "order") == "idle") then {
                  _follow = _unit addAction ["<t color = '#ffff00'>Follow</t>", _dogFollow, [_unit,_playSound]];
                  _find = _unit addAction ["<t color = '#ffff00'>Seek</t>", _dogSeek, [_unit,_playSound]];
                  _rest = _unit addAction ["<t color = '#ff0000'>Hide!</t>", _dogHide, [_unit,_playSound]];
                  _heel = _unit addAction ["<t color = '#ffff00'>Heel</t>", _dogHeel, [_unit,_playSound]];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_follow,_find,_rest,_heel]];
              };
      
              if ((_unit getvariable "order") == "active") then {
                  _stop = _unit addAction ["<t color = '#ff0000'>Stop!</t>", _dogStop, [_unit,_playSound]];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_stop]];
              };
      
              if ((_unit getvariable "dead") == "active") then {
                  _unit setvariable ["order","nil"];
              };    
              waituntil {((_unit getvariable "step") == "go")};
          };
      };
      
      _var1 = [_unit] call _setVariable;
      _loop = [_unit,_dogWhistle,_dogFollow,_dogSeek,_dogHide,_dogHeel,_dogStop,_dogGrowl,_playSound,_dogReturnIdle, _dogVehicle] call _actions;
      Alles anzeigen

      Und dann würde mich noch interessieren wo ich das einfügen muss. In die Missin\core\fn_setupEVH.sqf ???

      Zitat von nflug

      _deinDog addEventHandler ["Killed", {_this call life_fnc_WantedListAddDog}];

      Und hier ne neue Datei WantedListAddDog

      Spoiler anzeigen

      /*
      By nflug
      */
      _player = (this select 1); //Der Killer
      _wantedid = "50"; // Die ID für den WantedList Eintrag.

      [getPlayerUID _player,_player GVAR ["realname",name _player],_wantedid] remoteExecCall ["life_fnc_wantedAdd",RSERV];

      Besten Dank.

      Tapse mich wieder ins Arma3 xxx-Life rein :D

    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 4. September 2017 um 17:51
      • #82
      Zitat von Saturin78

      Hallole zusammen,

      das hier ist zwar ein recht altes System, aber hab es mal in der aktuellen Altis Life 5.0.0 ausprobiert. Es musste noch ne kleine remoteExec Anpassung gemacht werden, aber soweit geht es mal. Also es erscheint der Vierbeiner ( random ), es werden die 5000,- Kaufpreis abgezogen und die Sounds spielen ab. Aber, es erscheinen dauernd Fehler die per -showScriptErrors angezeigt werden.

      Fehler beim Kauf des Hundes

      17:32:11 Error in expression <ns";

      {

      _unit removeaction _x;

      } foreach _actions;

      _actions = [ ];

      if ((_unit ge>

      17:32:11 Error position: <_actions;

      _actions = [ ];

      if ((_unit ge>

      17:32:11 Error Nicht definierte Variable in Ausdruck: _actions

      17:32:11 File mpmissions\__CUR_MP.Altis\dogfunctions.sqf, line 292

      Fehler beim spawnen des Hundes

      17:32:18 Error in expression <_soundToPlay = _soundPath + "sounds\" + _sound + ".ogg";

      publicvariable "sound";>

      17:32:18 Error position: <_sound + ".ogg";

      publicvariable "sound";>

      17:32:18 Error Nicht definierte Variable in Ausdruck: _sound

      17:32:18 File mpmissions\__CUR_MP.Altis\dogfunctions.sqf, line 238

      Meine Datei sieht folgendermaßen aus:

      C: dogfunctions.sqf
      #include "script_macros.hpp"
      /*
      dog functions
      
      pass in the calling unit
      
      made by: 
      |TG-355th| Yink
      
      NPC_Init:  this addAction ["Hund kaufen",life_fnc_dogFunctions,[(_this select 1)]];
      */
      
      if(life_cash < 5000) exitWith{hint("Du hast keine 5000,- Altis $ um einen Hund zu kaufen!");};
      life_cash = life_cash - 5000;
      
      private["_sounds","_sound","_actions","_dog","_randomDog"];
      _unit = _this select 0;
      _side = side _unit;
      sleep 2;
      _setVariable = {
          _unit setvariable ["order","nil"];
          _unit setvariable ["step","wait"];
          _unit setvariable ["action","true"];
          _unit setvariable ["seek","false"];
      };
      
      _dogRevive = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
      
          sleep 5;
      
          _side = side _unit;
          _unit setvariable ["follow",'false'];
          _tempPos = getpos _unit;
          _group1 = createGroup _side;
      
          _randomDog = ["Fin_sand_F","Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Fin_random_F","Alsatian_Sand_F","Alsatian_Black_F","Alsatian_Sandblack_F","Alsatian_Random_F"];// call BIS_fnc_selectRandom;
          _randomDog1 = _randomDog call BIS_fnc_selectRandom;
          _dog = _randomDog1 createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];    //"dog = this"
          //"Alsatian_Sandblack_F" createUnit [_tempPos,_group1,"_unit setvariable ['dog',format['%1',this]]", 1.0, "private"];
          sleep 0.5;
      
          _dog = _unit getvariable "dog";
          _unit setvariable ["step","go"];
      };
      
      _dogWhistle = {
          _unit = (_this select 3) select 0;
          _growl = (_this select 3) select 1;
          play = (_this select 3) select 2;
          _idle = (_this select 3) select 3;
          _vehicle = (_this select 3) select 4;
          _sound = ["whistle",_unit, 20] spawn play;
          hint "Jessie, here girl!";
          sleep 1;
          _unit setvariable ["follow",'false'];
          _tempPos = [(getpos _unit) select 0,((getpos _unit) select 1) + 1,0];
          _side = side _unit;
      
          _group1 = createGroup _side;
      
          _randomDog = ["Fin_sand_F","Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Fin_random_F","Alsatian_Sand_F","Alsatian_Black_F","Alsatian_Sandblack_F","Alsatian_Random_F"];// call BIS_fnc_selectRandom;
          _randomDog1 = _randomDog call BIS_fnc_selectRandom;
          _dog = _randomDog1 createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];
          //_dog = "Alsatian_Sandblack_F" createUnit [_tempPos,_group1,"dog = this", 1.0, "private"];
      
          _unit setvariable ["order","idle"];
          _unit setvariable ["step","go"];
          _unit setvariable ["dog", dog];
          (_unit getvariable "dog") setvariable ["player",_unit];
      
          _vehicle    = [_unit,play] spawn _vehicle;
          _return    = [_unit,play] spawn _idle;
          _growl = [_unit,play] spawn _growl;
          killed = {
              _unit1 = (_this select 0) getvariable "player";
              _unit1 setvariable ["order","dead"];
              _unit setvariable ["action","false"];
              _unit1 setvariable ["step","go"];
          };
      
          shot_at = {
              _dog = _this select 0;
              _firer = _this select 1;
              _unit1 = _dog getvariable "player";
              _side = east;
      
              if (((side _firer)==east)&&((_unit1 getvariable "seek")=="true")) then {
                  _unit1 setVariable ["order","idle"];
                  _unit1 setVariable ["step","go"];
                  _unit1 setVariable ["seek","false"];
                  _dog doMove (getpos _unit1);
                  _sound = ["dog_whine",_dog, 20] spawn play;
              };
          };
      
          (_unit getvariable "dog") addeventhandler
          [
              "killed",
              { 
                  _script = [(_this select 0)] call killed;
              }
          ];
      
          (_unit getvariable "dog") addeventhandler
          [
              "FiredNear",
              {
                  _script = [(_this select 0),(_this select 1)] call shot_at;
              }
          ];    
      };
      
      _dogFollow = {
          _unit = (_this select 3) select 0;
          _dog    = _unit getvariable "dog";
          _play    = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          hint "Jessie, follow!";
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
          _unit setvariable ["follow",'true'];
      
          while {(_unit getvariable "follow") == 'true'} do  {
              sleep 0.5;
              if ((_dog distance _unit) < 4) then {
                  _dog domove getpos _dog;
              } else {
                  _dog domove getpos _unit;    
              };
              sleep 1;
          };
      };
      
      _dogSeek = {
          _unit = (_this select 3) select 0;
          _unit setvariable ["follow",'false'];
          _unit setvariable ["seek","true"];
          _dog = _unit getvariable "dog";
          _play = (_this select 3) select 1;
          hint "Jessie, seek!";
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
          _dog = _unit getvariable "dog";
          _side = east;
          _radius = 1000;
      
          _nearestunits = nearestObjects [_dog,["Man"],_radius];
          _nearestunitofside = [];
      
          if(_side countSide _nearestunits > 0) then {
              _sound = ["dog_one",_dog, 20] spawn _play;
              {
                  _unit = _x;
                  if (side _unit == _side) then {
                      _nearestunitofside = _nearestunitofside + [_unit]
                  };
              } foreach _nearestunits;
          } else {
              _sound = ["dog_ruff",_dog, 20] spawn _play;
              _unit setvariable ["order","idle"];
          };
      
          _dog domove getpos (_nearestunitofside select 0);
          waituntil {(_dog distance (_nearestunitofside select 0))<10};
          _sound = ["dog_ruff",_dog, 20] spawn _play;
      
      };
      
      _dogHeel = {
          _unit = (_this select 3) select 0;
          _dog = _unit getvariable "dog";
          _play = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          hint "Jessie, Heal!";
          _unit setvariable ["follow",'false'];
          _dog = _unit getvariable "dog";
      
          _dog domove [(getpos _unit) select 0,((getpos _unit) select 1) - 1, 0];
          _unit setvariable ["order","active"];
          _unit setvariable ["step","go"];
      };
      
      _dogHide = {
          _unit = (_this select 3) select 0;
          _dog = _unit getvariable "dog";
          _unit setvariable ["follow",'false'];
          _dog = _unit getvariable "dog";
          hint "Jessie, Hide!";
          _unit setvariable ["order","nil"];
          _unit setvariable ["step","go"];
          sleep 3;
          deleteVehicle _dog;
      };
      
      _dogStop = {
          _unit = (_this select 3) select 0;
          _dog = _unit getVariable "dog";
          _play = (_this select 3) select 1;
          _sound = ["dog_one",_dog, 20] spawn _play;
          _unit setvariable ["seek","false"];
          hint "Jessie, Hold!";
          _unit setvariable ["follow",'false'];
          _dog domove getpos _dog;
          _unit setvariable ["order","idle"];
          _unit setvariable ["step","go"];
      };
      
      _dogGrowl = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
          _side = east;
          while {alive _dog} do {
              _timer = round(random 5);
              _timer    = _timer + 5;
              _objs = nearestobjects [_dog,["Man"], 50];
              {
                  if ((side _x)!=_side) then {
                      _objs = _objs - [_x];
                  };
              } foreach _objs;
              if ((count _objs)>0) then {
                  _play = _this select 1;
                  _sound = ["dog_growl",_dog, 11] spawn _play;
              };
      
              sleep _timer;
              _dog = _unit getvariable "dog";
          };
      };
      
      _playSound = {
          _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
          sound = _this select 0;
          dog1 = _this select 1;
          _volume = _this select 2;
          _soundToPlay = _soundPath + "sounds\" + _sound + ".ogg";
          publicvariable "sound";
          publicvariable "dog1";
          [dog1 say3d sound] remoteExec ["bis_fnc_spawn",true];
          //[{dog1 say3d sound},"bis_fnc_spawn",true] spawn bis_fnc_mp;
          //_null = [[_sountToPlay,_dog],"sound_fnc",true,true] spawn BIS_fnc_MP;
          //_sound = ["hey",_unit getvariable "dog"] call _playSound;
      };
      
      _dogReturnIdle = {
          _unit = _this select 0;
          _dog    = _unit getvariable "dog";
          _play = _this select 1;
          while {alive _dog} do {
              waituntil {(((_dog distance _unit)>30)&&((_unit getvariable "order")=="idle"))};
              _dog domove (getpos _unit);
              _sound = ["dog_whine",_dog, 20] spawn _play;
              waituntil {unitReady _dog};
          };
      };
      
      _dogVehicle = {
          _unit = _this select 0;
          _dog = _unit getvariable "dog";
          while {alive _dog} do {
              waituntil {(((vehicle _unit)!= _unit)&&((_dog distance _unit)<8))};
              _veh = vehicle _unit;
              _dog attachto [_unit,[0,0.1,-0.2]];
              _dog attachto [_veh];
              waituntil {(vehicle _unit)!= _veh};
              detach _dog;
              _dog setpos [((getpos _unit) select 0) + 2,((getpos _unit) select 1) + 2,0];
          };
      };
      
      _actions = {
          _unit = _this select 0;
          _dogWhistle    = _this select 1;
          _dogFollow = _this select 2;
          _dogSeek = _this select 3;
          _dogHide = _this select 4;
          _dogHeel = _this select 5;
          _dogStop    = _this select 6;
          _dogGrowl = _this select 7;
          _playSound    = _this select 8;
          _dogReturnIdle = _this select 9;
          _dogVehicle    = _this select 10;
          _unit setvariable ["action","true"];
      
          while {(_unit getvariable "action")=="true"} do {
              _unit setvariable ["step","wait"];
              _actions = _unit getvariable "actions";
              {
                  _unit removeaction _x;
              } foreach _actions;
              _actions = [ ];
          
              if ((_unit getvariable "order") == "nil") then {
                  _whistle = _unit addAction ["Whistle", _dogWhistle, [_unit, _dogGrowl,_playSound,_dogReturnIdle,_dogVehicle]];
                  _unit setvariable ["order","whistle"];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_whistle]];
              };
      
              if ((_unit getvariable "order") == "idle") then {
                  _follow = _unit addAction ["<t color = '#ffff00'>Follow</t>", _dogFollow, [_unit,_playSound]];
                  _find = _unit addAction ["<t color = '#ffff00'>Seek</t>", _dogSeek, [_unit,_playSound]];
                  _rest = _unit addAction ["<t color = '#ff0000'>Hide!</t>", _dogHide, [_unit,_playSound]];
                  _heel = _unit addAction ["<t color = '#ffff00'>Heel</t>", _dogHeel, [_unit,_playSound]];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_follow,_find,_rest,_heel]];
              };
      
              if ((_unit getvariable "order") == "active") then {
                  _stop = _unit addAction ["<t color = '#ff0000'>Stop!</t>", _dogStop, [_unit,_playSound]];
                  _unit setvariable ["step","wait"];
                  _unit setvariable ["actions",[_stop]];
              };
      
              if ((_unit getvariable "dead") == "active") then {
                  _unit setvariable ["order","nil"];
              };    
              waituntil {((_unit getvariable "step") == "go")};
          };
      };
      
      _var1 = [_unit] call _setVariable;
      _loop = [_unit,_dogWhistle,_dogFollow,_dogSeek,_dogHide,_dogHeel,_dogStop,_dogGrowl,_playSound,_dogReturnIdle, _dogVehicle] call _actions;
      Alles anzeigen

      Und dann würde mich noch interessieren wo ich das einfügen muss. In die Missin\core\fn_setupEVH.sqf ???

      Besten Dank.

      Alles anzeigen

      Hatte ich auch eingebaut der Hund bellt nicht also der macht keine Geräusche und es zieht eigentlich viel FPS wenn es viele Leute machen aber ansonsten ein schönes Feature.

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

    • Saturin78
      Profi
      Reaktionen
      409
      Trophäen
      10
      Beiträge
      1.340
      • 4. September 2017 um 18:27
      • #83
      Zitat von Avirex

      Hatte ich auch eingebaut der Hund bellt nicht also der macht keine Geräusche und es zieht eigentlich viel FPS wenn es viele Leute machen aber ansonsten ein schönes Feature.

      Also Bellen usw. Tun die Hundchen ja, aber es kommt einfach immer die blöden Fehler wegen _actions und _sound. Wie gesagt, es geht sonst so wie im Video usw. Aber mich machen solche Fehlermeldungen unruhig. :) Und das mit dem eintragen in die Wantedliste, da bin ich mir net so sicher ob das nciht in die dog datei soll oder in die Eventhandler datei, wobei da es seltsam aussieht.

      Tapse mich wieder ins Arma3 xxx-Life rein :D

    • mur205
      Frischling
      Trophäen
      9
      Beiträge
      3
      • 10. September 2017 um 22:27
      • #84

      bump

    • herbeth
      Frischling
      Trophäen
      9
      Beiträge
      4
      • 28. September 2017 um 09:21
      • #85

      1 - Sie müssen den Befehl haben, das Kontogeld zu bezahlen

      2 - der Hund folgt mir nicht

    • lordbrs
      Fortgeschrittener
      Reaktionen
      18
      Trophäen
      9
      Beiträge
      307
      • 25. Januar 2018 um 21:49
      • #86

      Ne Frage am Rande....das Tut funktioniert, habs ja schon mal nachgebaut aber ist es möglich die Hunde ohne zu kaufen im Spiel zu platzieren?

      Also wenn man sie zb. bei der Bank hinstellt zum Bewachen und wenn ein anderer kommt ausser nen Cop das sie angreifen und Schaden verursachen?

      Oder das man sie zb. per Init in einem NPC spawnen lassen und ihnen eine Route festlegen lassen kann?

      Ich weiss hat mit dem Tut nun nicht mehr viel zu tun aber da es hier das einzige Hundethema ist....:)

      LG und Gute Nacht

    • Herr_Oster
      Amateur
      Reaktionen
      13
      Trophäen
      9
      Beiträge
      177
      Bilder
      28
      • 1. April 2019 um 20:16
      • #87

      Hab auch eine Frage, welche leicht vom Thema abweicht, ist es möglich selbst nen Hund zu werden??

      Weiß da jemand was?

    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 1. April 2019 um 20:41
      • #88
      Zitat von Pascalo1233

      Hab auch eine Frage, welche leicht vom Thema abweicht, ist es möglich selbst nen Hund zu werden??

      Weiß da jemand was?

      [TUTORIAL] DROGENEFFEKT MAL ANDERS (CHICKEN DINNER) :D

      Auf meinem Code basierend solltest du das hinkriegen :P


      Mit freundlichen Grüßen

      Joe Barbaro

      Entwickler vom Arma 3 Batch Generator


    Registrieren oder Einloggen

    Du bist noch kein Mitglied von NodeZone.net? Registriere dich kostenlos und werde Teil einer großartigen Community!

    Registrieren

    Ähnliche Themen

    • [Sammelthread] Scripts/Links/Tutorials/Anleitungen ArmA 3

      • Stig
      • 2. September 2016 um 18:29
      • Tutorials & Releases

    Wichtige Links & Informationen

    Server & Hosting-Ressourcen

      Server Administration & Hosting Basics

      Windows Server Support & Guides

      Linux Server Configuration & Help

      Setting up TeamSpeak 3 & VoIP Servers

      Domains & Web Hosting for Beginners & Professionals

      Cloud Hosting, Docker & Kubernetes Tutorials

    Gameserver & Modding-Ressourcen

      ArmA 3 Tutorials & Script Collection

      Renting & Operating Gameservers

      DayZ Server Management & Help

      FiveM (GTA V) Server & Script Development

      Rust Server Modding & Administration

      Setting up & Optimizing ARK Survival Servers

    NodeZone.net – Deine Community für Gameserver, Server-Hosting & Modding

      NodeZone.net ist dein Forum für Gameserver-Hosting, Rootserver, vServer, Webhosting und Modding. Seit 2015 bietet unsere Community eine zentrale Anlaufstelle für Server-Admins, Gamer und Technikbegeisterte, die sich über Server-Management, Hosting-Lösungen und Spielemodding austauschen möchten.


      Ob Anleitungen für eigene Gameserver, Hilfe bei Root- und vServer-Konfigurationen oder Tipps zu Modding & Scripting – bei uns findest du fundiertes Wissen und praxisnahe Tutorials. Mit einer stetig wachsenden Community findest du hier Antworten auf deine Fragen, Projektpartner und Gleichgesinnte für deine Gaming- und Serverprojekte. Schließe dich NodeZone.net an und werde Teil einer aktiven Community rund um Server-Hosting, Gameserver-Management und Modding-Ressourcen.

    Wer jetzt nicht teilt ist selber Schuld:
    1. Nutzungsbestimmungen
    2. Datenschutzerklärung
    3. Impressum
    4. Urheberrechts- oder Lizenzverstoß melden
  • Trimax Design coded & layout by Gino Zantarelli 2023-2025©
    Community-Software: WoltLab Suite™