PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit Revive und Randomcar


Althalus
07.03.2009, 16:16
Uhu Chummerz,

habe mal wieder ein Problem. Also meine Init.sqf sieht folgendermaßen aus:

[] execVM "x_scripts\x_vec_hud.sqf";

if(!(isserver)) exitWith{};
[car1] execVM "sqf\Randomauto.sqf";
[car2] execVM "sqf\Randomauto.sqf";
[car3] execVM "sqf\Randomauto.sqf";
[car4] execVM "sqf\Randomauto.sqf";
[car5] execVM "sqf\Randomauto.sqf";
[car6] execVM "sqf\Randomauto.sqf";
[car7] execVM "sqf\Randomauto.sqf";
[car8] execVM "sqf\Randomauto.sqf";
[car9] execVM "sqf\Randomauto.sqf";
[car10] execVM "sqf\Randomauto.sqf";
[car11] execVM "sqf\Randomauto.sqf";
[car12] execVM "sqf\Randomauto.sqf";
[car13] execVM "sqf\Randomauto.sqf";
[car14] execVM "sqf\Randomauto.sqf";
[car15] execVM "sqf\Randomauto.sqf";
[car16] execVM "sqf\Randomauto.sqf";
[car17] execVM "sqf\Randomauto.sqf";
[car18] execVM "sqf\Randomauto.sqf";
[car19] execVM "sqf\Randomauto.sqf";
[car20] execVM "sqf\Randomauto.sqf";
[car21] execVM "sqf\Randomauto.sqf";
[car22] execVM "sqf\Randomauto.sqf";
[car23] execVM "sqf\Randomauto.sqf";
[car24] execVM "sqf\Randomauto.sqf";
[car25] execVM "sqf\Randomauto.sqf";
[car26] execVM "sqf\Randomauto.sqf";
[car27] execVM "sqf\Randomauto.sqf";
[car28] execVM "sqf\Randomauto.sqf";
[car29] execVM "sqf\Randomauto.sqf";
[car30] execVM "sqf\Randomauto.sqf";
[car31] execVM "sqf\Randomauto.sqf";
[car32] execVM "sqf\Randomauto.sqf";
[car33] execVM "sqf\Randomauto.sqf";
[car34] execVM "sqf\Randomauto.sqf";
[car35] execVM "sqf\Randomauto.sqf";
[car36] execVM "sqf\Randomauto.sqf";
[car37] execVM "sqf\Randomauto.sqf";
[car38] execVM "sqf\Randomauto.sqf";
[car39] execVM "sqf\Randomauto.sqf";
[car40] execVM "sqf\Randomauto.sqf";
[car41] execVM "sqf\Randomauto.sqf";
[car42] execVM "sqf\Randomauto.sqf";
[car43] execVM "sqf\Randomauto.sqf";
[car44] execVM "sqf\Randomauto.sqf";
[car45] execVM "sqf\Randomauto.sqf";
[car46] execVM "sqf\Randomauto.sqf";
[car47] execVM "sqf\Randomauto.sqf";
[car48] execVM "sqf\Randomauto.sqf";
[car49] execVM "sqf\Randomauto.sqf";
[car50] execVM "sqf\Randomauto.sqf";
[car51] execVM "sqf\Randomauto.sqf";
[car52] execVM "sqf\Randomauto.sqf";

execVM "DAC\DAC_Config_Creator.sqf";

beam_1 = false;

//Initialise revive script
server execVM "sqf\revive_init.sqf";
if (true) exitWith {};


Wenn ich jetzt ins Spiel gehe Fahren die Autos so wie sie sollen, schön unberechenbar von einem Punkt zu nem anderen. Jedoch funktioniert Revive nicht, DAC genausowenig.

Wenn die Init.sqf aber so aussieht:

[] execVM "x_scripts\x_vec_hud.sqf";

execVM "DAC\DAC_Config_Creator.sqf";

beam_1 = false;

//Initialise revive script
server execVM "sqf\revive_init.sqf";
if (true) exitWith {};

if(!(isserver)) exitWith{};
[car1] execVM "sqf\Randomauto.sqf";
[car2] execVM "sqf\Randomauto.sqf";
[car3] execVM "sqf\Randomauto.sqf";
[car4] execVM "sqf\Randomauto.sqf";
[car5] execVM "sqf\Randomauto.sqf";
[car6] execVM "sqf\Randomauto.sqf";
[car7] execVM "sqf\Randomauto.sqf";
[car8] execVM "sqf\Randomauto.sqf";
[car9] execVM "sqf\Randomauto.sqf";
[car10] execVM "sqf\Randomauto.sqf";
[car11] execVM "sqf\Randomauto.sqf";
[car12] execVM "sqf\Randomauto.sqf";
[car13] execVM "sqf\Randomauto.sqf";
[car14] execVM "sqf\Randomauto.sqf";
[car15] execVM "sqf\Randomauto.sqf";
[car16] execVM "sqf\Randomauto.sqf";
[car17] execVM "sqf\Randomauto.sqf";
[car18] execVM "sqf\Randomauto.sqf";
[car19] execVM "sqf\Randomauto.sqf";
[car20] execVM "sqf\Randomauto.sqf";
[car21] execVM "sqf\Randomauto.sqf";
[car22] execVM "sqf\Randomauto.sqf";
[car23] execVM "sqf\Randomauto.sqf";
[car24] execVM "sqf\Randomauto.sqf";
[car25] execVM "sqf\Randomauto.sqf";
[car26] execVM "sqf\Randomauto.sqf";
[car27] execVM "sqf\Randomauto.sqf";
[car28] execVM "sqf\Randomauto.sqf";
[car29] execVM "sqf\Randomauto.sqf";
[car30] execVM "sqf\Randomauto.sqf";
[car31] execVM "sqf\Randomauto.sqf";
[car32] execVM "sqf\Randomauto.sqf";
[car33] execVM "sqf\Randomauto.sqf";
[car34] execVM "sqf\Randomauto.sqf";
[car35] execVM "sqf\Randomauto.sqf";
[car36] execVM "sqf\Randomauto.sqf";
[car37] execVM "sqf\Randomauto.sqf";
[car38] execVM "sqf\Randomauto.sqf";
[car39] execVM "sqf\Randomauto.sqf";
[car40] execVM "sqf\Randomauto.sqf";
[car41] execVM "sqf\Randomauto.sqf";
[car42] execVM "sqf\Randomauto.sqf";
[car43] execVM "sqf\Randomauto.sqf";
[car44] execVM "sqf\Randomauto.sqf";
[car45] execVM "sqf\Randomauto.sqf";
[car46] execVM "sqf\Randomauto.sqf";
[car47] execVM "sqf\Randomauto.sqf";
[car48] execVM "sqf\Randomauto.sqf";
[car49] execVM "sqf\Randomauto.sqf";
[car50] execVM "sqf\Randomauto.sqf";
[car51] execVM "sqf\Randomauto.sqf";
[car52] execVM "sqf\Randomauto.sqf";


Funktioniert DAC und Revive aber die Autos fahren nicht mehr. Bin langsam am verzweifeln.
Jemand einen Lösungsvorschlag?

so long

Althi

Vienna
07.03.2009, 17:08
Versuche es einmal mit einer Pause von 10 Sekunden vor den Fahrzeugen und mit nur einem Fahrzeug.

...
...

if(!(isserver)) exitWith{};
sleep 10;
[car1] execVM "sqf\Randomauto.sqf";

Xeno
07.03.2009, 17:14
Da hat mal wieder jemand Lokalitätsprobleme...


execVM "x_scripts\x_vec_hud.sqf";
execVM "DAC\DAC_Config_Creator.sqf";
beam_1 = false;

//Initialise revive script
// sollte das nicht eher "revive_sqf\revive_init.sqf" heißen ?
execVM "sqf\revive_init.sqf";

if (isServer) then {
for "_i" from 1 to 52 do {
call compile format ["
[car%1] execVM "sqf\Randomauto.sqf";
",_i];
};
};
Stimmt "execVM "sqf\revive_init.sqf";" wirklich ?
Oder sollte das nicht eher "execVM "revive_sqf\revive_init.sqf";" heißen ?

Hab auch noch die 52 Randomauto Zeilen auf 5 reduziert.

Noch was, was ist in Randomauto.sqf ?

Xeno

Althalus
07.03.2009, 18:49
in Randomcar.sqf ist:
if(!(isserver)) exitWith{};
private "_car";
_fahrzeug = _this select 0;
_unitd = Driver _fahrzeug;
_randomstart = random 30;
sleep _randomstart;
while {canMove _fahrzeug} do
{
_u = random 10.99;
_u = _u-(_u % 1);
_u = _u+1;
sleep 0.5;
_fahrzeug setfuel 1;
if(_u == 1) then
{
_unitd move (getpos urb1);
};
if(_u == 2) then
{
_unitd move (getpos urb2);
};

if(_u == 3) then
{
_unitd move (getpos urb3);
};

if(_u == 4) then
{
_unitd move (getpos urb4);
};

if(_u == 5) then
{
_unitd move (getpos urb5);
};

if(_u == 6) then
{
_unitd move (getpos urb6);
};

if(_u == 7) then
{
_unitd move (getpos urb7);
};

if(_u == 8) then
{
_unitd move (getpos urb8);
};

if(_u == 9) then
{
_unitd move (getpos urb9);
};

if(_u == 10) then
{
_unitd move (getpos urb10);
};

if(_u == 11) then
{
_unitd move (getpos urb11);
};

sleep 5;
waitUntil {(unitready _unitd) OR (not (canMove _fahrzeug))};
};
das ist damit die Autos umherfahren.

Und was die revive_init.sqf angeht habe ich die in den Ordner "sqf" gepackt. es ist die sqf datei wo man einstellt wer reviven darf, die spielernamen drinne stehn und all sowas.

werde ich morgen ausprobieren.
vielen dank :) melde dann morgen wie es lief.

Xeno
07.03.2009, 19:08
Dein Problem war, dass das Revive Script nicht auf dem Client gestartet wurde, da Du vorher mit

if(!(isserver)) exitWith{};

rausgesprungen bist.

Und gerade auf dem Client läuft ja der Großteil des Revive.

Xeno

Althalus
08.03.2009, 17:46
Also ArmA gibt mir einen Fehler wenn ich die Init.sqf so benutze wie du es geschrieben hast. Er gibt nämlich ein Fehler bei
for "_i" from 1 to 52 do {
vorallem meckert er wegen dem "_i" das er damit nichts anfangen kann.
Habe die Init.sqf nun so stehen:
execVM "x_scripts\x_vec_hud.sqf";
execVM "DAC\DAC_Config_Creator.sqf";
beam_1 = false;

//Initialise revive script
execVM "sqf\revive_init.sqf";

[Car1] execVM "sqf\Randomauto.sqf";
[Car2] execVM "sqf\Randomauto.sqf";
[Car3] execVM "sqf\Randomauto.sqf";
[Car4] execVM "sqf\Randomauto.sqf";
[Car5] execVM "sqf\Randomauto.sqf";
[Car6] execVM "sqf\Randomauto.sqf";
[Car7] execVM "sqf\Randomauto.sqf";
[Car8] execVM "sqf\Randomauto.sqf";
[Car9] execVM "sqf\Randomauto.sqf";
[Car10] execVM "sqf\Randomauto.sqf";
[Car11] execVM "sqf\Randomauto.sqf";
[Car12] execVM "sqf\Randomauto.sqf";
[Car13] execVM "sqf\Randomauto.sqf";
[Car14] execVM "sqf\Randomauto.sqf";
[Car15] execVM "sqf\Randomauto.sqf";
[Car16] execVM "sqf\Randomauto.sqf";
[Car17] execVM "sqf\Randomauto.sqf";
[Car18] execVM "sqf\Randomauto.sqf";
[Car19] execVM "sqf\Randomauto.sqf";
[Car20] execVM "sqf\Randomauto.sqf";
[Car21] execVM "sqf\Randomauto.sqf";
[Car22] execVM "sqf\Randomauto.sqf";
[Car23] execVM "sqf\Randomauto.sqf";
[Car24] execVM "sqf\Randomauto.sqf";
[Car25] execVM "sqf\Randomauto.sqf";
[Car26] execVM "sqf\Randomauto.sqf";
[Car27] execVM "sqf\Randomauto.sqf";
[Car28] execVM "sqf\Randomauto.sqf";
[Car29] execVM "sqf\Randomauto.sqf";
[Car30] execVM "sqf\Randomauto.sqf";
[Car31] execVM "sqf\Randomauto.sqf";
[Car32] execVM "sqf\Randomauto.sqf";
[Car33] execVM "sqf\Randomauto.sqf";
[Car34] execVM "sqf\Randomauto.sqf";
[Car35] execVM "sqf\Randomauto.sqf";
[Car36] execVM "sqf\Randomauto.sqf";
[Car37] execVM "sqf\Randomauto.sqf";
[Car38] execVM "sqf\Randomauto.sqf";
[Car39] execVM "sqf\Randomauto.sqf";
[Car40] execVM "sqf\Randomauto.sqf";
[Car41] execVM "sqf\Randomauto.sqf";
[Car42] execVM "sqf\Randomauto.sqf";
[Car43] execVM "sqf\Randomauto.sqf";
[Car44] execVM "sqf\Randomauto.sqf";
[Car45] execVM "sqf\Randomauto.sqf";
[Car46] execVM "sqf\Randomauto.sqf";
[Car47] execVM "sqf\Randomauto.sqf";
[Car48] execVM "sqf\Randomauto.sqf";
[Car49] execVM "sqf\Randomauto.sqf";
[Car50] execVM "sqf\Randomauto.sqf";
[Car51] execVM "sqf\Randomauto.sqf";
[Car52] execVM "sqf\Randomauto.sqf";
Er meckert jetzt nicht mehr und die Fahrzeuge fahren, jedoch weiß ich nicht ob revive funktioniert da ich es noch nicht testen kann. es findet sich niemand der mich abknallt :D

Xeno
08.03.2009, 18:22
Also ArmA gibt mir einen Fehler wenn ich die Init.sqf so benutze wie du es geschrieben hast. Er gibt nämlich ein Fehler bei
for "_i" from 1 to 52 do {vorallem meckert er wegen dem "_i" das er damit nichts anfangen kann.
Habe die Init.sqf nun so stehen:

Mach aus dem

[car%1] execVM "sqf\Randomauto.sqf";
ein

[car%1] execVM ""sqf\Randomauto.sqf"";

Dann klappts auch mit dem Nachbarn (zwei Anführungszeichen), mein Fehler.

Xeno