Spieler Loadout: Unterschied zwischen den Versionen

Aus Arma Wiki
Wechseln zu: Navigation, Suche
(Player Loadout erstellen)
(Player Loadout erstellen)
Zeile 74: Zeile 74:
 
</source>
 
</source>
 
<br>
 
<br>
* Der Absatz '''''comment "Set identity";''''' ist zu löschen!
+
* Im loadout script, den Absatz '''''comment "Set identity";''''' löschen!
* '''this''' mit '''_unit''' ersetzten
+
* Via Editor, mit suchen und ersetzten '''this''' mit '''_unit''' austauschen.
 
* Am beginn des loadout script ist folgendes hinzuzufügen
 
* Am beginn des loadout script ist folgendes hinzuzufügen
 
<source line lang="sql">
 
<source line lang="sql">

Version vom 30. Juni 2016, 07:52 Uhr

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

Erstellung des Event Script (initPlayerLocal.sqf)

  • Im Mission 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. CASE "S2": {"loadout\s2.sqf"};
  4. ...
  5. ...
  6. DEFAULT { hint "default" };
  7. };
  8. [player] CALL compile preprocessFileLineNumbers _loadoutScript;


Hinweis Hinweis
"S1" der Name der im Editor platzierten spielbaren Figur ist.
loadout\s1.sqf bedeutet das im zuvor erstellten Verzeichnis, loadout, im Hauptverzeichnis 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;


  • Im loadout script, den Absatz comment "Set identity"; löschen!
  • Via Editor, mit suchen und ersetzten this mit _unit austauschen.
  • Am beginn des loadout script ist folgendes hinzuzufügen
  1. waitUntil {!isNull player};
  2. _unit = _this SELECT 0;
  • In die letzte Zeile im loadoutscript istfolgendes einzufügen: if(true) exitWith{};


  • So soll das script nach Bearbeitung aussehen
  1. waitUntil {!isNull player};
  2. _unit = _this SELECT 0;
  3. comment "Exported from Arsenal by Neodym";
  4. comment "Remove existing items";
  5. removeAllWeapons _unit;
  6. removeAllItems _unit;
  7. removeAllAssignedItems _unit;
  8. removeUniform _unit;
  9. removeVest _unit;
  10. removeBackpack _unit;
  11. removeHeadgear _unit;
  12. removeGoggles _unit;
  13.  
  14. comment "Add containers";
  15. _unit forceAddUniform "U_I_CombatUniform";
  16. FOR "_i" FROM 1 TO 4 do {_unit addItemToUniform "30Rnd_556x45_Stanag";};
  17. _unit addItemToUniform "16Rnd_9x21_Mag";
  18. _unit addVest "V_PlateCarrierIA2_dgtl";
  19. FOR "_i" FROM 1 TO 4 do {_unit addItemToVest "FirstAidKit";};
  20. FOR "_i" FROM 1 TO 6 do {_unit addItemToVest "HandGrenade";};
  21. FOR "_i" FROM 1 TO 3 do {_unit addItemToVest "16Rnd_9x21_Mag";};
  22. _unit addBackpack "B_TacticalPack_oli";
  23. FOR "_i" FROM 1 TO 2 do {_unit addItemToBackpack "SatchelCharge_Remote_Mag";};
  24. FOR "_i" FROM 1 TO 4 do {_unit addItemToBackpack "DemoCharge_Remote_Mag";};
  25. _unit addHeadgear "H_Cap_headphones";
  26. _unit addGoggles "G_Bandanna_oli";
  27.  
  28. comment "Add weapons";
  29. _unit addWeapon "arifle_Mk20C_F";
  30. _unit addPrimaryWeaponItem "muzzle_snds_M";
  31. _unit addPrimaryWeaponItem "acc_flashlight";
  32. _unit addPrimaryWeaponItem "optic_MRCO";
  33. _unit addWeapon "hgun_P07_F";
  34.  
  35. comment "Add items";
  36. _unit linkItem "ItemMap";
  37. _unit linkItem "ItemCompass";
  38. _unit linkItem "ItemWatch";
  39. _unit linkItem "ItemRadio";
  40. _unit linkItem "ItemGPS";
  41. IF(TRUE) exitWith{};