Einzelnen Beitrag anzeigen
Alt 17.03.2010, 14:56   #10 (permalink)
JoeJoe87577
500 Beiträge1000 Beiträge
 
Registriert seit: 05.01.2008
Alter: 32
Beiträge: 1.703
Standard

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

LG
JoeJoe
JoeJoe87577 ist offline