Spieler Loadout: Unterschied zwischen den Versionen

Aus Arma Wiki
Wechseln zu: Navigation, Suche
(Bearbeiten des VIRTUAL ARSENAL export)
Zeile 1: Zeile 1:
 
{{DISPLAYTITLE:Loadout für MP Mission erstellen}}
 
{{DISPLAYTITLE:Loadout für MP Mission erstellen}}
 +
 +
Diese Anleitung ist für jeden Spielbaren Charakter, welcher ein spezifisches loadout nutzten soll, durchzuführen.
  
 
==Erstellung des Event Script (initPlayerLocal.sqf)==
 
==Erstellung des Event Script (initPlayerLocal.sqf)==

Version vom 22. Juni 2016, 12:49 Uhr


Diese Anleitung ist für jeden Spielbaren Charakter, welcher ein spezifisches loadout nutzten soll, durchzuführen.

Erstellung des Event Script (initPlayerLocal.sqf)

  • Im Missions Verzeichnis die Datei initPlayerLocal.sqf erstellen.
  • Datei initPlayerLocal.sqf ist wie folgt Aufbau:


  1. _loadoutScript = switch (toUpper (str player)) do {
  2. CASE "S1": {"loadout\s1.sqf"};
  3. ...
  4. ...
  5. DEFAULT { hint "default" };
  6. };
  7. [player] CALL compile preprocessFileLineNumbers _loadoutScript;


Hinweis Hinweis
"S1" der Name der im Editor plazierten spielbaren Figur ist.
loadout\s1.sqf bedeutet das im zuvor erstellten Verzeichnis, loadout, im Haupverzeichnis der Mission das loadout für den spieler "S1" abgelegt ist.

Player Loadout erstellen

  • das Grundgerüst von z.b. s1.sqf, das Loadout, wird am besten via Virtual Arsenal. Zu erreichen über LEARN > VIRTUAL ARSENAL.
  • Im VIRTUAL ARSENAL das gewünschte loadout erstellen.
  • Mit STRG-C oder via Exportbutton in einen Editor deiner Wahl exportieren.

Bearbeiten des VIRTUAL ARSENAL export

  • Beispiel export aus VIRTUAL ARSENAL
  1. comment "Exported from Arsenal by Neodym";
  2.  
  3. comment "Remove existing items";
  4. removeAllWeapons this;
  5. removeAllItems this;
  6. removeAllAssignedItems this;
  7. removeUniform this;
  8. removeVest this;
  9. removeBackpack this;
  10. removeHeadgear this;
  11. removeGoggles this;
  12.  
  13. comment "Add containers";
  14. this forceAddUniform "U_I_CombatUniform";
  15. FOR "_i" FROM 1 TO 4 do {this addItemToUniform "30Rnd_556x45_Stanag";};
  16. this addItemToUniform "16Rnd_9x21_Mag";
  17. this addVest "V_PlateCarrierIA2_dgtl";
  18. FOR "_i" FROM 1 TO 4 do {this addItemToVest "FirstAidKit";};
  19. FOR "_i" FROM 1 TO 6 do {this addItemToVest "HandGrenade";};
  20. FOR "_i" FROM 1 TO 3 do {this addItemToVest "16Rnd_9x21_Mag";};
  21. this addBackpack "B_TacticalPack_oli";
  22. FOR "_i" FROM 1 TO 2 do {this addItemToBackpack "SatchelCharge_Remote_Mag";};
  23. FOR "_i" FROM 1 TO 4 do {this addItemToBackpack "DemoCharge_Remote_Mag";};
  24. this addHeadgear "H_Cap_headphones";
  25. this addGoggles "G_Bandanna_oli";
  26.  
  27. comment "Add weapons";
  28. this addWeapon "arifle_Mk20C_F";
  29. this addPrimaryWeaponItem "muzzle_snds_M";
  30. this addPrimaryWeaponItem "acc_flashlight";
  31. this addPrimaryWeaponItem "optic_MRCO";
  32. this addWeapon "hgun_P07_F";
  33.  
  34. comment "Add items";
  35. this linkItem "ItemMap";
  36. this linkItem "ItemCompass";
  37. this linkItem "ItemWatch";
  38. this linkItem "ItemRadio";
  39. this linkItem "ItemGPS";
  40.  
  41. comment "Set identity";
  42. this setFace "GreekHead_A3_03";
  43. this setSpeaker "Male03GRE";
  44. [this,"TFAegis"] CALL bis_fnc_setUnitInsignia;


  • Der Absatz comment "Set identity"; ist zu löschen!
  • Am beginn des loadout script ist folgendes hinzuzufügen
  1. waitUntil {!isNull player};
  2. _unit = _this SELECT 0;
  • this mit _unit ersetzten
  • Letzte Zeile im loadoutscript if(true) exitWith{};