Ach stimmt da war ja was.
Könnte man aber mit nem Respawn Eventhandler lösen und das Fahrzeug dann an die gewünschte Stelle bewegen. Aber ok wenn es dann schon so anfängt macht man sich wohl doch einfach gleich nen eigenes Script.
Hier ist noch nen altes Fahrzeug-spawnscript das ich noch rumliegen hatte:
PHP-Code:
if (isServer) then {
_obj = _this select 0;
_time = _this select 1;
_delay = _this select 2;
_count = _this select 3;
_init = _this select 4;
_name = vehicleVarName _obj;
_pos = getPos _obj;
_dmg = getDamage _obj;
_vup = vectorUp _obj;
_vdir = vectorDir _obj;
_fuel = fuel _obj;
_fire = canFire _obj;
_type = typeOf _obj;
_count = 0;
for [{_loop=0},{(_count >= _delay)},{_loop=_loop}] do
{
if ({alive _x} count crew _obj > 0) then {
_count = 0;
} else {
if (!canMove _obj) then {
_count = _count + 2;
};
if ((getPos _obj distance _pos) > 10) then {
_count = _count + 1;
};
if (_fire != canFire _obj) then {
_count = _count + 1;
};
if (damage _obj > 0.95) then {
_count = _count + 3;
};
};
sleep 1;
};
deleteVehicle _obj;
sleep _time;
if (_count != 0) then {
_count = _count - 1;
_new = _type createVehicle _pos;
_new setPos _pos;
_new setVectorDirAndUp [_vdir,_vup];
_new setDamage _dmg;
_new setFuel _fuel;
_new setVehicleInit format ["nul=[this,%1,%2,%3,%4] execVM 't-respawn.sqf';%5 = this;%4",_time,_delay,_count,_init,_name];
processInitCommands;
};
};
In dem Fall respawnt das Fahrzeug unterschiedlich schnell wieder, jenachdem ob es kaputt ist, nichtmehr schiessen kann, bewegungsunfähig ist oder einfach irgendwo stehen gelassen wurde.
Wenn du also an dieser Stelle die Zahlen veränderst, kannst du diese Bedingungen beliebig anpassen:
PHP-Code:
if (!canMove _obj) then {
_count = _count + 2;
};
if ((getPos _obj distance _pos) > 10) then {
_count = _count + 1;
};
if (_fire != canFire _obj) then {
_count = _count + 1;
};
if (damage _obj > 0.95) then {
_count = _count + 3;
};
Wenn eine Respawnzeit von 30 sekunden eingestellt ist, respawnt das Fahrzeut in dem Fall hier nach 30 sekunden wenn es stehen gelassen wurde.
Ist es zerstört, spawnt es bereits nach 10 sekunden. (sollte selbsterklärend sein)