Przepraszam za odkop, ale może to się komuś przyda
Według mnie o wiele łatwiej jest uruchomić RTE (Alt-E w menu) poustawiać w nim obiekty, zapisać misję po czym wyjść do pulpitu i znaleźć w folderze misji plik mission.sqf.
Otwieramy plik mission.sqf i oczom naszym ukazuje się taki oto kod (przykładowo, zależy co robiłeś w edytorze):
- Kod: Zaznacz cały
activateAddons [
];
activateAddons [];
initAmbientLife;
_this = createCenter east;
_center_0 = _this;
_group_0 = createGroup _center_0;
_unit_0 = objNull;
if (true) then
{
_this = _group_0 createUnit ["RU_Soldier_Light", [4312.6128, 3942.7642], [], 0, "CAN_COLLIDE"];
_unit_0 = _this;
_this setUnitAbility 0.60000002;
if (true) then {_group_0 selectLeader _this;};
if (true) then {selectPlayer _this;};
};
_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["TKBasicAmmunitionBox_EP1", [4217.5073, 3977.1714, 4.7738085], [], 0, "NONE"];
_vehicle_1 = _this;
_this setVehicleLock "LOCKED";
_this setPos [4217.5073, 3977.1714, 4.7738085];
};
processInitCommands;
runInitScript;
finishMissionInit;
Teraz szukamy w nim czegoś takiego:
- Kod: Zaznacz cały
_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["TKBasicAmmunitionBox_EP1", [4217.5073, 3977.1714, 4.7738085], [], 0, "NONE"];
_vehicle_1 = _this;
_this setVehicleLock "LOCKED";
_this setPos [4217.5073, 3977.1714, 4.7738085];
};
Ten fragment odpowiada za stworzenie obiektu, poprostu za pomocą komendy a nie tak jak się robi w zwykłym edytorze 2D. Kopiujemy ten fragment, robimy nowy plik SQF w folderze twojej misji z lotniskowcem i tam wklejamy ten fragment.
Potem wystarczy dodać do pliku Init.sqf linijkę:
- Kod: Zaznacz cały
res=execVM "nazwa pliku w którym dodałeś ten fragment.sqf"
Wtedy pozostaje jeszcze problem, że nie widzisz tych jednostek na mapie w edytorze 2D. Ja ostatnio korzystałem z tej metody robiąc kryjówkę snajpera, użyłem takiego oto kodu:
- Kod: Zaznacz cały
_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["TKBasicAmmunitionBox_EP1", [4217.5073, 3977.1714, 4.7738085], [], 0, "NONE"];
_vehicle_1 = _this;
_this setVehicleLock "LOCKED";
_this setPos [4217.5073, 3977.1714, 4.7738085];
clearweaponcargo _this;
clearmagazinecargo _this;
_this addweaponcargo ["LeeEnfield",1];
_this addmagazinecargo ["10x_303",16];
_this addmagazinecargo ["HandGrenade_East",2];
_this addmagazinecargo ["HandGrenade_West",11];
_this addmagazinecargo ["PipeBomb",1];
_this addweaponcargo ["Binocular",1];
_this addweaponcargo ["NVGoggles",1];
};
_vehicle_3 = objNull;
if (true) then
{
_this = createVehicle ["Explosive", [4214.6191, 3979.021, 5.0994854], [], 0, "CAN_COLLIDE"];
_vehicle_3 = _this;
_this setDir -23.093426;
_this setPos [4214.6191, 3979.021, 5.0994854];
};
_vehicle_4 = objNull;
if (true) then
{
_this = createVehicle ["TK_Assault_Pack_EP1", [4215.9907, 3978.6138, 4.6676588], [], 0, "CAN_COLLIDE"];
_vehicle_4 = _this;
_this setDir 24.765337;
_this setPos [4215.9907, 3978.6138, 4.6676588];
clearweaponcargo _this;
clearmagazinecargo _this;
_this addweaponcargo ["revolver_EP1",1];
_this addmagazinecargo ["6Rnd_45ACP",8];
};
_vehicle_5 = objNull;
if (true) then
{
_this = createVehicle ["AmmoCrates_NoInteractive_Small", [4214.2573, 3978.0376, 4.7043405], [], 0, "CAN_COLLIDE"];
_vehicle_5 = _this;
_this setPos [4214.2573, 3978.0376, 4.7043405];
};
_vehicle_6 = objNull;
if (true) then
{
_this = createVehicle ["Fort_Crate_wood", [4211.5645, 3973.5647, 4.8657479], [], 0, "CAN_COLLIDE"];
_vehicle_6 = _this;
_this setDir -54.159889;
_this setPos [4211.5645, 3973.5647, 4.8657479];
};
_vehicle_7 = objNull;
if (true) then
{
_this = createVehicle ["Land_Crates_stack_EP1", [4212.4136, 3972.1621, 4.8422637], [], 0, "CAN_COLLIDE"];
_vehicle_7 = _this;
_this setDir -60.699249;
_this setPos [4212.4136, 3972.1621, 4.8422637];
};
_vehicle_8 = objNull;
if (true) then
{
_this = createVehicle ["EvMap", [4214.9136, 3971.2876, 5.9024687], [], 0, "CAN_COLLIDE"];
_vehicle_8 = _this;
_this setPos [4214.9136, 3971.2876, 5.9024687];
};
_vehicle_9 = objNull;
if (true) then
{
_this = createVehicle ["Can_small", [4214.7271, 3971.2, 5.905087], [], 0, "CAN_COLLIDE"];
_vehicle_9 = _this;
_this setPos [4214.7271, 3971.2, 5.905087];
};
_vehicle_10 = objNull;
if (true) then
{
_this = createVehicle ["Radio", [4214.4614, 3970.9932, 5.9029393], [], 0, "CAN_COLLIDE"];
_vehicle_10 = _this;
_this setDir 20.535419;
_this setPos [4214.4614, 3970.9932, 5.9029393];
};
_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["MetalBucket", [4212.8589, 3971.6584, 4.8693399], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setPos [4212.8589, 3971.6584, 4.8693399];
};
Z samym kodem możesz pokombinować, ja tego nie robiłem bo nie miałem zbytnio potrzeby, jedyne co to dodałem to broń i magazynki do skrzynek z amunicją
U mnie wszystko śmiga jak należy, RTE jest przydatny właśnie do ustawiania obiektów, ale poza tym lepiej mi jest w edytorku 2D.
Przepraszam za przydługie kody i za odkop, pozdrawiam serdecznie.