Einzelnen Beitrag anzeigen
Alt 15.12.2008, 17:34   #8 (permalink)
Xeno
10 Jahre hx3
5000 Beiträge
 
Benutzerbild von Xeno
 
Registriert seit: 03.01.2008
Alter: 84
Beiträge: 6.552
Standard

Zum Beispiel so... (nicht getestet, irgendwann muss ich mir mal ArmA auf den Rechner auf der Arbeit machen )

Code:
if (format ["%1", ab2] == "scalar bool array string 0xe0ffffef") exitWith {};

if (!alive ab2) exitWith {};

_bombs = ["R_Hydra_HE","R_PG7V_AT","SH_125_HE","SH_105_HE","M_Hellfire_AT","BO_GBU12_LGB","Nichts"];

_ran = floor (random count _bombs);

if ((_bombs select _ran) != "Nichts") then {
    Bomb1 = (_bombs select _ran) createVehicle [(getpos ab2 select 0),(getpos ab2 select 1),0];
    // wenn die Variable für die Bombe (BombX) immer anders heißen muss, dann so:
    // call compile format ["Bomb%1 = (_bombs select _ran) createVehicle [(getpos ab2 select 0),(getpos ab2 select 1),0];",_ran];
} else {
    hint "Die Bombe ist Schrott!";
};
Xeno
__________________
In arma everything is made of refined explodium, armored with wet paper towels.
Xeno ist offline   Mit Zitat antworten