HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-167/)
-   -   ArmA 2 RealTimeEditor (https://hx3.de/editing-scripting-167/arma-2-realtimeeditor-18769/)

DerSchakal 14.03.2010 17:59

ArmA 2 RealTimeEditor
 
Abend,
Also folgende Fragte stellt sich mir grade, im Manual wird berichtet das ich durch den RTE ein Template erstellen kann (gemacht!is nun ne .xml) hab das.
Soll ich die .xml in eine .sqf Datei ändern?Hab ich gemacht und wollt diese per Auslöser aufrufen, passiert ist nix. :(
Was muss ich anders machen?Bin mitn Scripten bei Arma net so ^^ Web-Programmierung liegt mir eher ala HTML/PHP.

Hier der Link zum Manual

RTE v4.3 Manual

Edit:Oder besser, wie muss ein Template aussehen und wie benutz ich das?

i0n0s 15.03.2010 00:10

Du lädst die XML-Datei in RTE Capture und klingst auf SQF. Dann erstellt er dir die SQF, welche du dann benutzt.

DerSchakal 15.03.2010 06:46

Ja hab ich gemacht diese Kopiert und zu ner SQF erstellt.
Wie ruf ich dies nun auf?Ich habs per Auslöser versucht aber FAIL. :komisch:
Wie muss ich das richtig machen?

Hier die template.sql die ich per Auslöser versucht habe aufzurufen.
Syntax hab ich nul = execVM "Script.sqf"; und zweiter versuch
nul ="Marker" execVM "Script.sqf";


Code:

private ["_result", "_center", "_dir", "_code", "_position", "_azimut", "_distance", "_array", "_pos", "_arr"];
_result = false;
switch (typeName _this) do {
    case "ARRAY": {
        switch (count _this) do {
            case 3: {
                _center = _this;
                _dir = 0;
                _result = true;
            };
            case 2: {
                _center = _this select 0;
                _dir = _this select 1;
                _result = true;
            };
        };
    };
    case "STRING": {
        _center = markerPos _this;
        _dir = markerDir _this;
        deleteMarker _this;
        _result = true;
    };
};
if (!_result) then {
    Player sideChat "Invalid parameter!";
} else {
    _code = compile "
            private [""_center"", ""_position"", ""_azimut"", ""_distance"", ""_result""];
            _center = _this select 0;
            _position = _this select 1;
            _distance = _position distance [0,0];
            _azimut = acos((_position select 0) / _distance);
            if (!finite _azimut) then {
                _azimut = 0;
            };
            if (_position select 1 < 0) then {
                _azimut = 360 - _azimut;
            };
            _azimut = _azimut + (_this select 2);
            _result = [cos(_azimut) * _distance, sin(_azimut) * _distance];
            _result = [(_result select 0) + (_center select 0),
                      (_result select 1) + (_center select 1),
                      _position select 2];
            _result
        ";       
    _array = [    [],    [],    [],    [
        [0, ["Barrack2", [-2.12427, -33.613, 0.19819], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [2, ["C130J", [19.9731, 44.7839, -0.20880], 160.88, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [4, ["Barrack2", [-12.7043, -33.5129, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [6, ["Barrack2", [7.18555, -33.603, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [8, ["Can_small", [-4.07593, -34.1604, 1.4166], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [10, ["FoldChair", [-3.06543, -33.9065, 0], 51.2639, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
        [12, ["Land_Barrel_empty", [-0.108643, -39.2869, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]]
    ],    [
        [
            west,
            [
                [14, ["USMC_Soldier_Light", [-20.0959, -44.5308, 0.0014228], 0, "NONE",0.5, "PRIVATE", 1, "c1 switchmove ""AmovPercMstpSsurWnonDnon"";c1 disableAI ""Anim"";doStop this;", "c1"]],
                [16, ["USMC_LHD_Crew_Blue", [-3.83447, -40.5554, 0.0014495], 192.841, "NONE",0, "PRIVATE", 1, "c4 disableAI ""ActsPercMstpSnonWnonDnon_talking02"";doStop this;", "c4"]],
                [18, ["USMC_Soldier_Light", [-3.27075, -33.9524, 0.73459], 212.817, "NONE",0, "PRIVATE", 1, "c2 switchmove ""miles_c0briefing_odpovedel_loop"";doStop this;", "c2"]],
                [20, ["USMC_Soldier_Pilot", [-4.44775, -41.8354, 0.0014381], 30.1982, "NONE",0, "PRIVATE", 1, "c3 playmove ""ActsPercMstpSnonWnonDnon_talking02"";c3 disableAI ""ActsPercMstpSnonWnonDnon_talking02"";doStop this;", "c3"]]
            ],
            [],
            []
        ]
    ], [], false, true, []];
    {
        _pos = _x select 1;
        _azimut = _x select 4;
        _pos = [_center, _pos, _dir] call _code;
        _azimut = _azimut - _dir;
        _x set [1, _pos];
        _x set [4, _azimut];
    } forEach (_array select 0);
    {
        _pos = _x select 0;
        _azimut = _x select 3;
        _pos = [_center, _pos, _dir] call _code;
        _azimut = _azimut - _dir;
        _x set [0, _pos];
        _x set [3, _azimut];
    } forEach (_array select 1);
    {
        _arr = _x select 1;
        _pos = _arr select 0;
        _azimut = _arr select 1;;
        _pos = [_center, _pos, _dir] call _code;
        _azimut = _azimut - _dir;
        _arr set [0, _pos];
        _arr set [1, _azimut];
    } forEach (_array select 2);
    {
        _arr = _x select 1;
        _pos = _arr select 1;
        _azimut = _arr select 2;
        _pos = [_center, _pos, _dir] call _code;
        _azimut = _azimut - _dir;
        _arr set [1, _pos];
        _arr set [2, _azimut];
    } forEach (_array select 3);
    {
        {
            _arr = _x select 1;
            _pos = _arr select 1;
            _azimut = _arr select 2;
            _pos = [_center, _pos, _dir] call _code;
            _azimut = _azimut - _dir;
            _arr set [1, _pos];
            _arr set [2, _azimut];
        } forEach (_x select 1);
        {
            _arr = _x select 1;
            _pos = _arr select 1;
            _azimut = _arr select 2;
            _pos = [_center, _pos, _dir] call _code;
            _azimut = _azimut - _dir;
            _arr set [1, _pos];
            _arr set [2, _azimut];
        } forEach (_x select 2);
        {
            _pos = _x select 0;
            _pos = [_center, _pos, _dir] call _code;
            _x set [0, _pos];
        } forEach (_x select 3);
    } forEach (_array select 4);
    {
        _pos = _x select 0;
        _pos = [_center, _pos, _dir] call _code;
        _x set [0, _pos];
    } forEach (_array select 5);
    _array call ION_RTE_fRestore;
};

EDIT: Kommt es mir nur so vor oder ist die Syntax von Arma fast gleich wie PHP?Schleifen und so Oo nun beim genauer betrachten so.

JoeJoe87577 16.03.2010 07:35

Ich hab dasselbe Problem, ich hab mir gestern ein Templemate erstellt, das Ganze dann als .sqf gespeichert und auf einem Marker mit "Marker" execVM "Checkpoint1.sqf" ausgeführt...
Aber irgendwie wollte er nicht.

Das genaue Script hab ich nicht, weil ich im Moment nihc zuhause bin.

LG

i0n0s 16.03.2010 12:49

Seit ihr sicher, dass der RTE geladen ist?
D.h. ihr habt CBA mit installiert?

DerSchakal 16.03.2010 14:50

Ja alles dabei.
Aber es geht ja eher darum das Template nun zu laden mittels Marker.

Kannst vielleicht nicht nen Beispiel machen?

JoeJoe87577 16.03.2010 15:52

Bei mir läuft der RTE, CBA und ACE... Ich hab das ganze mal auf Utes ausprobiert, damit ich kein Porblem mit Addon Inseln habe.

i0n0s 16.03.2010 18:12

"Marker" execVM "Script.sqf";
stimmt eigentlich als Aufruf. Tauchen irgendwelche Fehler in der ArmA.rpt auf?

JoeJoe87577 17.03.2010 13:39

Ich werde es mal testen und meine RPT mal löschen...
Kann es sein, dass es nicht klappt wenn man das live im RTE machen möchte?

Und mir ist ein Bug ausgefallen, manchmal kann ich keine Auslöser platzieren, ich kann zwar alle Parameter im Fenster eintippen, wenn ich dann auf OK klicke erscheint eine blaue Fahne (Standart aussehen im RTE), aber das Fenster verschwindet nicht und die Fahne ist auch außerhalb des RTE zu sehen.

LG

JoeJoe87577 17.03.2010 13:56

So ich hab grade mal getestet. Die RPT sah nach dem Missionsstart, in der ich einen Civ als Spieler, einen Marker namens "Marker" und einen Trigger, der mit dem Spieler verbunden ist und aktiviert wird, wenn der Spieler am Leben ist, so aus:
Code:

647.766 (0) XEH: PreInit Started
653.434 (0) XEH: PreInit Finished
0:10:53,933 (0:00:00,000) [x\cba\addons\common\init.sqf:4] MISSINIT: missionName=test, worldName=utes, isMultiplayer=false, isServer=true
ion_rte_dta\ion_pipe.p3d: No geometry and no visual shape
ion_rte_dta\ion_pipe.p3d: No geometry and no visual shape
ion_rte_dta\ion_pipe.p3d: No geometry and no visual shape
ion_rte_dta\ion_pipe.p3d: No geometry and no visual shape
655.496 (0.116) XEH: PostInit Started
0:11:00,338 (0:00:00,177) [x\cba\addons\versioning\versioning.sqf:5] : cba_versioning_versions=["#CBA_HASH#",["cba","ace","acex"],[[[0,3,1,88],-1],[[1,0,10,322],-1],[[1,0,10,212],-1]],[[0,0,0],0]], cba_versioning_versions_server=any
660.39 (0.177) XEH: PostInit Finished

Das Script, welches ich einfach mal Script.sqf genannt habe, sah so aus:
Code:

private ["_result", "_center", "_dir", "_code", "_position", "_azimut", "_distance", "_array", "_pos", "_arr"];
_result = false;
switch (typeName _this) do {
        case "ARRAY": {
                switch (count _this) do {
                        case 3: {
                                _center = _this;
                                _dir = 0;
                                _result = true;
                        };
                        case 2: {
                                _center = _this select 0;
                                _dir = _this select 1;
                                _result = true;
                        };
                };
        };
        case "STRING": {
                _center = markerPos _this;
                _dir = markerDir _this;
                deleteMarker _this;
                _result = true;
        };
};
if (!_result) then {
        Player sideChat "Invalid parameter!";
} else {
        _code = compile "
                        private [""_center"", ""_position"", ""_azimut"", ""_distance"", ""_result""];
                        _center = _this select 0;
                        _position = _this select 1;
                        _distance = _position distance [0,0];
                        _azimut = acos((_position select 0) / _distance);
                        if (!finite _azimut) then {
                                _azimut = 0;
                        };
                        if (_position select 1 < 0) then {
                                _azimut = 360 - _azimut;
                        };
                        _azimut = _azimut + (_this select 2);
                        _result = [cos(_azimut) * _distance, sin(_azimut) * _distance];
                        _result = [(_result select 0) + (_center select 0),
                                          (_result select 1) + (_center select 1),
                                          _position select 2];
                        _result
                ";               
        _array = [        [],        [],        [],        [
                [0, ["Land_BagFenceLong", [4.6792, -2.22192, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [2, ["Land_BagFenceLong", [1.67212, -2.23291, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [4, ["Land_BagFenceLong", [-1.32788, -2.25293, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [6, ["Land_BagFenceLong", [-4.27393, -2.3125, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [8, ["Land_BagFenceCorner", [6.84375, -2.1792, 0], 90, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [10, ["Land_BagFenceCorner", [-6.73462, -2.30762, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [12, ["Land_BagFenceLong", [6.8042, 0.307861, 0], 90, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [14, ["Land_BagFenceRound", [5.552, 2.55908, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [16, ["Land_BagFenceLong", [-6.77515, -0.152832, 0], 90, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [18, ["Land_BagFenceLong", [-4.6189, 2.30591, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [20, ["Land_BagFenceCorner", [-6.76343, 2.26294, 0], 270, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [22, ["Land_BagFenceLong", [-1.7019, 2.3125, 0], 180, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [24, ["Land_BagFenceEnd", [0.740967, 2.3042, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [26, ["Land_BagFenceEnd", [3.60474, 1.18384, 0], 135, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]],
                [28, ["Land_CamoNetVar_NATO", [-0.0144043, 0.0681152, 0], 0, "NONE", "UNLOCKED", 1, 1, 1, "doStop this;", ""]]
        ],        [], [], false, true, []];
        {
                _pos = _x select 1;
                _azimut = _x select 4;
                _pos = [_center, _pos, _dir] call _code;
                _azimut = _azimut - _dir;
                _x set [1, _pos];
                _x set [4, _azimut];
        } forEach (_array select 0);
        {
                _pos = _x select 0;
                _azimut = _x select 3;
                _pos = [_center, _pos, _dir] call _code;
                _azimut = _azimut - _dir;
                _x set [0, _pos];
                _x set [3, _azimut];
        } forEach (_array select 1);
        {
                _arr = _x select 1;
                _pos = _arr select 0;
                _azimut = _arr select 1;;
                _pos = [_center, _pos, _dir] call _code;
                _azimut = _azimut - _dir;
                _arr set [0, _pos];
                _arr set [1, _azimut];
        } forEach (_array select 2);
        {
                _arr = _x select 1;
                _pos = _arr select 1;
                _azimut = _arr select 2;
                _pos = [_center, _pos, _dir] call _code;
                _azimut = _azimut - _dir;
                _arr set [1, _pos];
                _arr set [2, _azimut];
        } forEach (_array select 3);
        {
                {
                        _arr = _x select 1;
                        _pos = _arr select 1;
                        _azimut = _arr select 2;
                        _pos = [_center, _pos, _dir] call _code;
                        _azimut = _azimut - _dir;
                        _arr set [1, _pos];
                        _arr set [2, _azimut];
                } forEach (_x select 1);
                {
                        _arr = _x select 1;
                        _pos = _arr select 1;
                        _azimut = _arr select 2;
                        _pos = [_center, _pos, _dir] call _code;
                        _azimut = _azimut - _dir;
                        _arr set [1, _pos];
                        _arr set [2, _azimut];
                } forEach (_x select 2);
                {
                        _pos = _x select 0;
                        _pos = [_center, _pos, _dir] call _code;
                        _x set [0, _pos];
                } forEach (_x select 3);
        } forEach (_array select 4);
        {
                _pos = _x select 0;
                _pos = [_center, _pos, _dir] call _code;
                _x set [0, _pos];
        } forEach (_array select 5);
        _array call ION_RTE_fRestore;
};

Der Trigger hatte folgendes in der Aktivierungszeile:
blubb = "Marker" execVM "script.sqf";

Ich hoffe mal hier ist alles wichtige :angel:

LG
JoeJoe

i0n0s 18.03.2010 00:57

Zitat:

Zitat von JoeJoe87577 (Beitrag 301576)
Und mir ist ein Bug ausgefallen, manchmal kann ich keine Auslöser platzieren, ich kann zwar alle Parameter im Fenster eintippen, wenn ich dann auf OK klicke erscheint eine blaue Fahne (Standart aussehen im RTE), aber das Fenster verschwindet nicht und die Fahne ist auch außerhalb des RTE zu sehen.

Jetzt bin ich sehr erstaunt.
Wieso funktioniert das nur manchmal nicht? Nach meinem Kenntnisstand sind die Trigger komplett kaputt.

In der ArmA.rpt fehlen leider irgendwelche Fehlermeldung, ich muss es mir also selber anschauen. Dazu werde ich aber die nächsten Tage definitiv nicht kommen.

JoeJoe87577 18.03.2010 08:20

Ok, dann schonmal ein dickes Danke für deine gute Arbeit.

DerSchakal 18.03.2010 08:25

Wäre toll wen das bald läuft :daumen: auch nen danke von mir für dein Support.

Cyborg11 01.04.2010 20:09

Habe hier einen Bug in der arma2.rpt entdeckt:
Zitat:

File ION_RTE\libs\DSM.sqf, line 1104
Error in expression <ect 0);
if (isNull _display) exitWith { throw "Critical error: Display is not op>
Error position: <throw "Critical error: Display is not op>
Error


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:28 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