HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-187/)
-   -   Copilot fehlt beim respawn (CH-49 Mohawk) (https://hx3.de/editing-scripting-187/copilot-fehlt-beim-respawn-ch-49-mohawk-23058/)

JeeperCreeper 24.10.2013 13:54

Copilot fehlt beim respawn (CH-49 Mohawk)
 
Hi Leute,

diesmal hab ich ein Problem mit dem KI respawn in einem Mohawk. Nach dem das Fahrzeug kaputt oder sonstiges ist, wird es gelöscht und wieder neu respawnt. Nur fehlt mir halt immer der Co-Pilot, der spawnt einfach nicht mit.

Die KI lese ich so aus:
Code:

if (! isNull driver _vehicle) then {_pilot1 = driver _vehicle; _besatzung = group _pilot1};
if (! isNull commander _vehicle) then {_pilot2 = commander _vehicle; _besatzung = group _pilot2};

mit
Code:

if (! isNil "_pilot1") then
    {
      _pilot1 = _besatzung createUnit [typeOf _pilot1, [0,0], [], 0, "FORM"];
      _pilot1 moveInDriver _vehicle
    };
    if (! isNil "_pilot2") then
    {
      _pilot2 = _besatzung createUnit [typeOf _pilot2, [0,0], [], 0, "FORM"];
      _pilot2 moveInCommander _vehicle
    };

wird die KI wieder gespawnt.

Habe es schon mit Gunner Probiert bei dem Pilot2, aber es geht einfach nicht. Wie heißt denn jetzt der Co-Pilot bei einem Mohawk? Mit nochmal driver hab ich es auch schon versucht, klappte auch nicht.:motz:
Kann mir vielleicht einer helfen bitte?

Edit:
Jaaawohl, und wieder selbst geschafft :juhu:
Bei dem zweiten Piloten geht es nur, wenn man moveInTurret benutzt, sieht dann so aus:
Code:

if (!isNil "_pilot1") then
  {
  _pilot1 = _besatzung createUnit [typeOf _pilot1, [0,0], [], 0, "FORM"];
  _pilot1 moveInDriver _vehicle
  };
 
  if (!isNil "_pilot2") then
  {
  _pilot2 = _besatzung createUnit [typeOf _pilot2, [0,0], [], 0, "FORM"];
  _pilot2 moveInTurret [_vehicle,[0]];
  };

falls es jemand interessiert.


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:56 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119