Zitat von
HenkerundKoch36
Bei erneutem austesten ist mir aufgefallen, dass ich garn nicht weiss wie ich dein syntax mit dem attachto befehl verknüpfen kann.
Geht das mit einer variablen? oder kann ich dein syntax irgendwie vor den attachto befehl hängen?
Vielleicht hast du darauf auch noch ne Antwort
Gruss
HK
kommt drauf an was du schon kannst also ich würds mit nem skript machen !
Code:
//
//Brauchst noch eine load und unload sqf in die du dann die attach und detach befehle reinmachst !
//
//aufruf: _nul = [l1, "Misc_cargo_cont_small_EP1"] execVM "lkw_cargo_load.sqf";
_lkw = _this select 0;
_type = _this select 1;
_action_shown = false;
_lkw setVariable ["cargo_full", false];
while {alive _lkw} do
{
if (!isNull (nearestObject [_lkw, _type]) && !(_action_shown) && !(_lkw getVariable "cargo_full")) then
{
_load = _lkw addAction ["Load Cargo", "load.sqf"];
_action_shown = true;
};
if (_lkw getVariable "cargo_full" && _action_shown) then
{
_unload = _lkw addAction ["Unload Cargo", "unload.sqf"];
_action_shown = false;
};
if (isNull (nearestObject [_lkw, _type])) then
{
_lkw removeAction _load;
};
};
if (!alive _lkw) then {_lkw removeAction _load; _lkw removeAction _unload;};
Ich hab keine Ahnung obs geht ! habs nicht getestet kurz aus dem Kopf und naja es ist schon 2 Uhr weiß nich ob da noch alles funktioniert
Gruß
Max