Jump to content

preserver833

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About preserver833

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. preserver833

    [Release] GOM - Aircraft Loadout V1.35

    any mirror download page? seems can't download.
  2. hi i search online but i cant find an solution. Anyone which may help to add the earning score to caller of artillery. Example, there are artillery vehicles and synced Support Provider: Artillery, then this is synced to Support Requester, then this is synced to all players, so they can call artillery when is needed. The issue is: when requester call artillery, the score is not added to requester/player. Any solution that score to be transferred to requester? Taking into account that players may have different names, so by counting players by name into that script can not be an good solution.
  3. preserver833

    #help Spawn Uav at high altitude

    lol Look like the solution was very simple. Just i changed the third number from 500 to 3000, then the Uav was spawned at 3000m above sea level. _item34 = createVehicle ["B_UAV_02_dynamicLoadout_F",[28000,22000,500],[],0,"FLY"]; to _item34 = createVehicle ["B_UAV_02_dynamicLoadout_F",[28000,22000,3000],[],0,"FLY"]; also changed _this setPosWorld [28000,22000,500]; to _this setPosWorld [28000,22000,3000]; and it WORKS. Let this be a guide for others.
  4. hi I need to spawn an Uav above 2500 meters above Sea level, which will cycle around at same position, and will be used only the camera/laser pointer to call artillery or similar. Taking control of drone driver i will disable for player, so player can use only camera. Thats is not any issue. I use this script below to spawn the Uav, but is spawned at 300-400 meters. When i use flyinheight 3000; the drone will spawn at 300-400m at position, then will climb up to 3000m, but there is enough time enemy to shot it down, so my goal is to spawn the drone at exact position, and drone will cycle around until the end of mission, or i can delete the uav using script at mission end, (Altis map). EagleEye1.sqf // Groups private _groups = []; private _groupIDs = []; private _item33 = grpNull; if (_layerRoot) then { _item33 = createGroup west; _this = _item33; _groups pushback _this; _groupIDs pushback 33; }; // Objects private _objects = []; private _objectIDs = []; private _item34 = objNull; _item34 = createVehicle ["B_UAV_02_dynamicLoadout_F",[28000,22000,500],[],0,"FLY"]; createVehicleCrew _item34; private _crew = crew _item34; _crew joinsilent _item33; _objects append _crew; _objectIDs append (_crew apply {-1}); _this = _item34; _objects pushback _this; _objectIDs pushback 34; _this setPosWorld [28000,22000,500]; _this setPylonLoadout [1,""]; _this setPylonLoadout [2,""]; [_this,"[[[[],[]],[[],[]],[[],[]],[[],[]]],false]"] call bis_fnc_initAmmoBox;; _item34 engineOn true; _item34 forceSpeed 300; _item34 flyinheight 3000; // Group attributes _this = _item33; if !(units _this isEqualTo []) then { [_this,0] setWaypointPosition [position leader _this,0]; _this setGroupID ["Eagle-Eye-1"];; }; i used different ways to try, including PositionASL but i cant make it to work.
  5. Yes, i used exactly what you supposed, and not worked. Using your code now works great. Thank you very much.
  6. I have another issue: Using a tower like target, by destroying the tower - mission must be accomplished. To achieve that i use: create task module, set task state module, two triggers and the tower like target. Tower init: if (isServer) then { this addEventHandler ["handleDamage", { params ["_twr", "", "_damage", "", "_projectile", "", "_instigator", ""]; if (_projectile isKindOf "SatchelCharge_Remote_Ammo") then { _damage = 1; " The tower is destroyed" remoteExec ["hint"]; } else { _damage = 0; }; _damage }];}; create task module: State "Assigned", Automatically to assign the "create module" i use a trigger and sync to it, time countdown 3 seconds after mission starts. The "create module" is synced to "task state" module, state "succeeded". Next is the second trigger, which is synced to "task state", main reason is to check if the tower still exist, if not then to accomplish the mission when the tower is destroyed. Syncing= trigger - create task module, set task state module - trigger. Everything function how it should, but not when above code is in init field of the tower. On other hand the code is useful to make the tower destructible only by Satchel Charge. I can use artillery or air to destroy the tower, but that's not the point.
  7. Thank you! This works great. Thanks.
  8. Already i tested by using "or" also by using || , but its same, DOES NOT WORK. Next time open arma 3 editor, test your code there, when you are sure that code is working THEN post it here, otherwise unproven thing are useless, losing the time of other peoples.
  9. simply does not work. at least for me. if you cant believe then try for yourself on editor. If an satchel charge can destroy the tower and shown the hint using your code, then something is wrong... if (isServer) then { this addEventHandler ["handleDamage", { params ["_twr", "", "_damage", "", "_projectile", "", "_instigator", ""]; if (_projectile isKindOf "DemoCharge_Remote_Ammo" of _projectile isKindOf "SatchelCharge_Remote_Ammo") then { _damage = 1; " The tower is destroyed" remoteExec ["hint"]; } else { _damage = 0; }; _damage }];
  10. replacing that with the code which you show, again does not run the "hint" after the tower is destroyed. this addEventHandler ["HandleDamage", { params ["", "", "_damage", "", "_projectile"]; if (_projectile isKindOf "DemoCharge_Remote_Ammo" or _projectile isKindOf "SatchelCharge_Remote_Ammo") then { _damage = 1; } else { _damage = 0; }; _damage }];
  11. when this code is in the init of and object, like radio tower, look like works great, but if there are attached other triggers which detect do the tower is destroyer, or which script will run after the tower is destroyed, this way does not run other scripts after when this code is in the init of an object. I used to put an radio tower in the map and name it tower1 and put the code BELOW, in the init of tower, an trigger on map, condition: !alive tower1; on activation: hint "The tower is destroyed" When this code is not in init of the tower then hint is shown, or other script instead. How would be the code if this code is n init field of an radio tower, example? Because i would like the tower to be destroyed only by such type charges. this addEventHandler ["HandleDamage", { params ["_tower1", "", "_damage", "", "_projectile", "", "_instigator", ""]; if (_projectile isKindOf "DemoCharge_Remote_Ammo" or _projectile isKindOf "SatchelCharge_Remote_Ammo") then { _damage = 1; } else { _damage = 0; }; _damage }]; and when i debloat the code like this: this addEventHandler ["HandleDamage", { params ["_tower1", "_damage", "_projectile"]; if (_projectile isKindOf "DemoCharge_Remote_Ammo") then { _damage = 1; } else { _damage = 0; }; _damage }]; then there is an error isKindof: Type number, expected string, Object I cant manage it to work. Can you explain more, or write how would be the exact code?
  12. If you use editor, click F5 > Environment, drag and drop "Edit Terrain Object", after you placed that icon in the editor, double click and UNCHECK "Enable Damage" to make the object indestructible, or if is UNchecked then meaning the object is indestructible, you can check the option and the object will become destructible.
  13. WORKS PERFECT. Thanks.
  14. preserver833

    Spawning units from sqf file

    I think i found an easy solution. So i decided to share my experience like an begginer on scripting, maybe others will have some benefits. In Arma 3 editor, you deploy all buildings and everything what you want, when you have finished building the mission, if you fill the map with units - the game will be slower. So, a better choice is to spawn units gradually. Because the mission which i make there are a lot of buildings, and exporting it to sqf file there will be a lot of things, and chances are high for any mistake if i change anything which i dont know (like begginer), so i make another mission running the same map again, like Altis example, but without any building, totally fresh. Example, i make an sqf file and name it Athira.sqf for Athira city. In Arma 3 editor i put 3 soldiers, changing things everyone what will carry (custom gear), what uniform and everything else, then second and third one grouping to the first one. Deploy some vehicles without crew and put them in custom location where they should spawn. I change the gear of units because if and enemy tank is disabled, the crew will leave the vehicle and will try to fight again. But crewman by default carry an small weapon and have almost no protection on, so when they leave the vehicle when get hit, they are useles in battle. My goal is even when crewmen leave the vehicle, they must have good weapons to continue to fight, like AA and AT missiles, and good rifles, also high protected body. After grouping 3 soldiers, then deploy empty vehicles in the map where every vehicle should be, COPY the 3 soldiers and PASTE near every vehicle. Drag and drop the group of soldier in the vehicle. Now we have different types of vehicles like tanks and APC, but with the same type of soldiers and high armed. Also, there can be deployed some groups of soldiers without any vehicle. You can combine if you like 9 soldiers copy-paste and group them into single commander. You can put any command in the init field of units or change what you like. When the city is full with enemy units waiting for players to come 😉 then i save the mission with different name, like Athira on this example. After that i export the mission to sqf, copy the script and paste in Notepad++. I will use only 3 soldier like example. /////////////////////////////////////////////////////////////////////////////////////////// // Init params [["_layerWhiteList",[],[[]]],["_layerBlacklist",[],[[]]],["_posCenter",[0,0,0],[[]]],["_dir",0,[0]],["_idBlacklist",[],[[]]]]; private _allWhitelisted = _layerWhiteList isEqualTo []; private _layerRoot = (_allWhitelisted || {true in _layerWhiteList}) && {!(true in _layerBlackList)}; /////////////////////////////////////////////////////////////////////////////////////////// // Markers private _markers = []; private _markerIDs = []; /////////////////////////////////////////////////////////////////////////////////////////// // Groups private _groups = []; private _groupIDs = []; private _item6 = grpNull; if (_layerRoot) then { _item6 = createGroup west; _this = _item6; _groups pushback _this; _groupIDs pushback 6; }; /////////////////////////////////////////////////////////////////////////////////////////// // Objects private _objects = []; private _objectIDs = []; private _item7 = objNull; if (_layerRoot) then { _item7 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _item6 selectLeader _item7; _this = _item7; _objects pushback _this; _objectIDs pushback 7; _this setPosWorld [14164.9,18674.4,28.9213]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Vorona_green_F","","","",["Vorona_HEAT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Vorona_HEAT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "SERGEANT"; _this enablestamina false;; _this setname "James Smith";; _this setface "WhiteHead_02";; _this setspeaker "Male06ENG";; _this setpitch 1.03;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item5 = objNull; if (_layerRoot) then { _item5 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item5; _objects pushback _this; _objectIDs pushback 5; _this setPosWorld [14166.4,18672.9,29.7634]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_B_Titan_tna_F","","","",["Titan_AA",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AA",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "CORPORAL"; _this enablestamina false;; _this setname "Charlie Wood";; _this setface "WhiteHead_19";; _this setspeaker "Male05ENG";; _this setpitch 0.99;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item9 = objNull; if (_layerRoot) then { _item9 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item9; _objects pushback _this; _objectIDs pushback 9; _this setPosWorld [14166,18673.3,29.2697]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Titan_short_ghex_F","","","",["Titan_AT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this enablestamina false;; _this setname "Chris Campbell";; _this setface "WhiteHead_13";; _this setspeaker "Male07ENG";; _this setpitch 1;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item10 = objNull; if (_layerRoot) then { _item10 = createVehicle ["I_MBT_03_cannon_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item10; _objects pushback _this; _objectIDs pushback 10; _this setPosWorld [14165.2,18673.3,30.6469]; _this setVectorDirAndUp [[-0.797892,0.602703,0.0108547],[-0.0346473,-0.0638305,0.997359]]; [_this,"[[[[""arifle_Mk20C_F""],[2]],[[""SmokeShell"",""SmokeShellGreen"",""30Rnd_556x45_Stanag""],[2,2,4]],[[""FirstAidKit""],[10]],[[],[]]],false]"] call bis_fnc_initAmmoBox;; }; /////////////////////////////////////////////////////////////////////////////////////////// // Triggers private _triggers = []; private _triggerIDs = []; /////////////////////////////////////////////////////////////////////////////////////////// // Group attributes (applied only once group units exist) _this = _item6; if !(units _this isEqualTo []) then { [_this,0] setWaypointPosition [position leader _this,0]; _this setGroupID ["Alpha 1-2"];; }; /////////////////////////////////////////////////////////////////////////////////////////// // Waypoints private _waypoints = []; private _waypointIDs = []; /////////////////////////////////////////////////////////////////////////////////////////// // Logics private _logics = []; private _logicIDs = []; /////////////////////////////////////////////////////////////////////////////////////////// // Layers /////////////////////////////////////////////////////////////////////////////////////////// // Crews if (!isNull _item7 && !isNull _item10) then {_item7 moveInDriver _item10;}; if (!isNull _item9 && !isNull _item10) then {_item9 moveInTurret [_item10,[0]];}; if (!isNull _item5 && !isNull _item10) then {_item5 moveInTurret [_item10,[0,0]];}; /////////////////////////////////////////////////////////////////////////////////////////// // Vehicle cargo /////////////////////////////////////////////////////////////////////////////////////////// // Connections /////////////////////////////////////////////////////////////////////////////////////////// // Inits (executed only once all entities exist; isNil used to ensure non-scheduled environment) isNil { }; /////////////////////////////////////////////////////////////////////////////////////////// // Module activations (only once everything is spawned and connected) /////////////////////////////////////////////////////////////////////////////////////////// [[_objects,_groups,_triggers,_waypoints,_logics,_markers],[_objectIDs,_groupIDs,_triggerIDs,_waypointIDs,_logicIDs,_markerIDs]] Now, we need to edit this script, so, first the init field and Markers field we dont need it, we delete at start. Its located in the beggining of the script. Also, if you have NOT used Triggers or anything other on editor, you can delete it, if you use - then leave the fields. In my situation i delete them: Init, Markers, Triggers, Waypoints, logistic, layers, Vehicle cargo, Connections, Inits, Module activations. Remain for now only: Groups, Objects, Group attributes, Crews (see below). We continue to edit: /////////////////////////////////////////////////////////////////////////////////////////// // Groups private _groups = []; private _groupIDs = []; private _item6 = grpNull; if (_layerRoot) then { _item6 = createGroup west; _this = _item6; _groups pushback _this; _groupIDs pushback 6; }; /////////////////////////////////////////////////////////////////////////////////////////// // Objects private _objects = []; private _objectIDs = []; private _item7 = objNull; if (_layerRoot) then { _item7 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _item6 selectLeader _item7; _this = _item7; _objects pushback _this; _objectIDs pushback 7; _this setPosWorld [14164.9,18674.4,28.9213]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Vorona_green_F","","","",["Vorona_HEAT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Vorona_HEAT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "SERGEANT"; _this enablestamina false;; _this setname "James Smith";; _this setface "WhiteHead_02";; _this setspeaker "Male06ENG";; _this setpitch 1.03;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item5 = objNull; if (_layerRoot) then { _item5 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item5; _objects pushback _this; _objectIDs pushback 5; _this setPosWorld [14166.4,18672.9,29.7634]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_B_Titan_tna_F","","","",["Titan_AA",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AA",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "CORPORAL"; _this enablestamina false;; _this setname "Charlie Wood";; _this setface "WhiteHead_19";; _this setspeaker "Male05ENG";; _this setpitch 0.99;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item9 = objNull; if (_layerRoot) then { _item9 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item9; _objects pushback _this; _objectIDs pushback 9; _this setPosWorld [14166,18673.3,29.2697]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Titan_short_ghex_F","","","",["Titan_AT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this enablestamina false;; _this setname "Chris Campbell";; _this setface "WhiteHead_13";; _this setspeaker "Male07ENG";; _this setpitch 1;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item10 = objNull; if (_layerRoot) then { _item10 = createVehicle ["I_MBT_03_cannon_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item10; _objects pushback _this; _objectIDs pushback 10; _this setPosWorld [14165.2,18673.3,30.6469]; _this setVectorDirAndUp [[-0.797892,0.602703,0.0108547],[-0.0346473,-0.0638305,0.997359]]; [_this,"[[[[""arifle_Mk20C_F""],[2]],[[""SmokeShell"",""SmokeShellGreen"",""30Rnd_556x45_Stanag""],[2,2,4]],[[""FirstAidKit""],[10]],[[],[]]],false]"] call bis_fnc_initAmmoBox;; }; /////////////////////////////////////////////////////////////////////////////////////////// // Group attributes (applied only once group units exist) _this = _item6; if !(units _this isEqualTo []) then { [_this,0] setWaypointPosition [position leader _this,0]; _this setGroupID ["Alpha 1-2"];; }; /////////////////////////////////////////////////////////////////////////////////////////// // Crews if (!isNull _item7 && !isNull _item10) then {_item7 moveInDriver _item10;}; if (!isNull _item9 && !isNull _item10) then {_item9 moveInTurret [_item10,[0]];}; if (!isNull _item5 && !isNull _item10) then {_item5 moveInTurret [_item10,[0,0]];}; After deleting everything, the script will look like this above. Then delete OR replace remaining things: In notepad++ find and replace "if (_layerRoot) then {" replace with "//1" because later you can use this code //1 to replace it with another one if you need it. _this setPosWorld and coordinates, replace with //2 _this setVectorDirAndUp and numbers after that, replace with //3 _this setname and the name after that, replace with //4 _this setface and face name, replace with //5 _this setspeaker and the sound after, replace with //6 _this setpitch and the number after, replace with //7 replace the }; with something else, like //8 in the "Group attributes" replace if !(units _this isEqualTo []) then { with //9 Below is how the script will look like. /////////////////////////////////////////////////////////////////////////////////////////// // Groups private _groups = []; private _groupIDs = []; private _item6 = grpNull; //1 _item6 = createGroup west; _this = _item6; _groups pushback _this; _groupIDs pushback 6; //8 /////////////////////////////////////////////////////////////////////////////////////////// // Objects private _objects = []; private _objectIDs = []; private _item7 = objNull; //1 _item7 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _item6 selectLeader _item7; _this = _item7; _objects pushback _this; _objectIDs pushback 7; //2 //3 _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Vorona_green_F","","","",["Vorona_HEAT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Vorona_HEAT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "SERGEANT"; _this enablestamina false;; //4 //5 //6 //7 _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; //8 private _item5 = objNull; //1 _item5 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item5; _objects pushback _this; _objectIDs pushback 5; //2 //3 _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_B_Titan_tna_F","","","",["Titan_AA",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AA",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "CORPORAL"; _this enablestamina false;; //4 //5 //6 //7 _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; //8 private _item9 = objNull; //1 _item9 = _item6 createUnit ["B_soldier_AR_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item9; _objects pushback _this; _objectIDs pushback 9; //2 //3 _this setUnitLoadout [["arifle_MSBS65_Mark_camo_F","","","optic_Arco_lush_F",["30Rnd_65x39_caseless_msbs_mag",30],[],""],["launch_O_Titan_short_ghex_F","","","",["Titan_AT",1],[],""],["hgun_P07_khk_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_I_E_Uniform_01_sweater_F",[["FirstAidKit",1],["30Rnd_65x39_caseless_msbs_mag",2,30],["16Rnd_9x21_Mag",2,16]]],["V_PlateCarrierSpec_wdl",[["FirstAidKit",2],["Chemlight_green",1,1],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["MiniGrenade",2,1],["SmokeShellBlue",4,1]]],["B_Carryall_eaf_F",[["FirstAidKit",2],["Titan_AT",3,1]]],"H_HelmetLeaderO_ghex_F","G_AirPurifyingRespirator_02_olive_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this enablestamina false;; //4 //5 //6 //7 _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; //8 private _item10 = objNull; //1 _item10 = createVehicle ["I_MBT_03_cannon_F",[14165.3,18673.5,-0.000259399],[],0,"CAN_COLLIDE"]; _this = _item10; _objects pushback _this; _objectIDs pushback 10; //2 //3 [_this,"[[[[""arifle_Mk20C_F""],[2]],[[""SmokeShell"",""SmokeShellGreen"",""30Rnd_556x45_Stanag""],[2,2,4]],[[""FirstAidKit""],[10]],[[],[]]],false]"] call bis_fnc_initAmmoBox;; //8 /////////////////////////////////////////////////////////////////////////////////////////// // Group attributes (applied only once group units exist) _this = _item6; //9 [_this,0] setWaypointPosition [position leader _this,0]; _this setGroupID ["Alpha 1-2"];; //8 /////////////////////////////////////////////////////////////////////////////////////////// // Crews if (!isNull _item7 && !isNull _item10) then {_item7 moveInDriver _item10;}; if (!isNull _item9 && !isNull _item10) then {_item9 moveInTurret [_item10,[0]];}; if (!isNull _item5 && !isNull _item10) then {_item5 moveInTurret [_item10,[0,0]];}; /////////////////////////////////////////////////////////////////////////////////////////// Now, we will delete all units and vehicles from editor and we will save the mission like empty map, and the sqf script like Athira.sqf, in the same folder where the mission is, then PLAY SCENARIO. During the game we will call the sqf file from debug console execVM "Athira.sqf"; In the mission is one unit like player, and one enemy tank. For the player, damage is disabled, so you can run the sqf file after you start the game, even if enemy tank is shooting you, but as soon as you run the script, there will spawn an friendly tank with custom crew inside. This example is for those which want to deploy custom units with custom gear in custom locations on mission build, without using triggers and other Systems (F5) commands which some does not function at all. You can download the example file and open it with mission editor then play the mission to check how it works, also you can check the sqf file. https://mega.nz/file/3M4CmQ4Z#jna3majUnk5oYWlVQP8tcrkc5uh_Nv5p7YCJuXuP2q4
  15. Hi there I need little help about mission. Im trying to make a mission, but if i put all defensive units in the map, maybe there will be lags. So i decided to make something else. I put all units in editor by choosing where which unit will be, then exporting the mission to .sqf script, where i copy that mission script and paste to Notepad++. From there i delete everything and remains only this (example): private _item1 = objNull; if (_layerRoot) then { _item1 = _item0 createUnit ["O_officer_F",[4122.15,4074.66,0],[],0,"CAN_COLLIDE"]; _item0 selectLeader _item1; _this = _item1; _objects pushback _this; _objectIDs pushback 1; _this setPosWorld [4122.15,4074.71,5.00144]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_RPK12_lush_F","","acc_flashlight","optic_Arco_ghex_F",["75rnd_762x39_AK12_Lush_Mag_F",75],[],""],["launch_RPG32_green_F","","","",[],[],""],[],["U_O_T_Soldier_F",[["FirstAidKit",1],["75rnd_762x39_AK12_Lush_Mag_F",1,75],["SmokeShellRed",1,1]]],["V_PlateCarrierIA1_dgtl",[]],[],"H_HelmetIA","G_Combat_Goggles_tna_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "MAJOR"; _this enablestamina false;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item9 = objNull; if (_layerRoot) then { _item9 = _item0 createUnit ["O_officer_F",[4121.51,4069.98,0],[],0,"CAN_COLLIDE"]; _this = _item9; _objects pushback _this; _objectIDs pushback 9; _this setPosWorld [4121.51,4070.03,5.00144]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_AK12_GL_lush_F","","","optic_Arco_lush_F",["30rnd_762x39_AK12_Lush_Mag_F",30],[],""],["launch_O_Titan_ghex_F","","","",[],[],""],[],["U_O_T_Soldier_F",[["FirstAidKit",1],["SmokeShellRed",1,1],["30rnd_762x39_AK12_Lush_Mag_F",2,30],["1Rnd_HE_Grenade_shell",2,1]]],["V_PlateCarrierIA1_dgtl",[["FirstAidKit",5],["30rnd_762x39_AK12_Lush_Mag_F",5,30],["1Rnd_HE_Grenade_shell",5,1]]],[],"H_HelmetIA","G_Combat_Goggles_tna_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this setRank "SERGEANT"; _this enablestamina false;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; private _item11 = objNull; if (_layerRoot) then { _item11 = _item0 createUnit ["O_officer_F",[4126.49,4069.99,0],[],0,"CAN_COLLIDE"]; _this = _item11; _objects pushback _this; _objectIDs pushback 11; _this setPosWorld [4126.49,4070.04,5.00144]; _this setVectorDirAndUp [[0,1,0],[0,0,1]]; _this setUnitLoadout [["arifle_AK12_GL_lush_F","","","optic_Arco_lush_F",["30rnd_762x39_AK12_Lush_Mag_F",30],[],""],["launch_MRAWS_green_F","","","",[],[],""],[],["U_O_T_Soldier_F",[["FirstAidKit",1],["SmokeShellRed",1,1],["30rnd_762x39_AK12_Lush_Mag_F",2,30],["1Rnd_HE_Grenade_shell",1,1]]],["V_PlateCarrierIA1_dgtl",[["FirstAidKit",5],["30rnd_762x39_AK12_Lush_Mag_F",5,30],["1Rnd_HE_Grenade_shell",5,1]]],[],"H_HelmetIA","G_Combat_Goggles_tna_F",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ChemicalDetector_01_watch_F","NVGoggles_INDEP"]]; _this setSkill 0.6; _this enablestamina false;; _this setVehicleReportRemoteTargets true; _this setVehicleReceiveRemoteTargets true; _this setVehicleReportOwnPosition true; }; So, the first unit is a commander, and the second and third one - follow orders of commander. My goal is: - to add or to delete, or to replace something in/from this script with something other, which will make those units to pawn when an .sqf file where this script will be - will run by triggering an trigger or similar. - i know there are different ways to spawn units, but (for me at least) its hard to find how to spawn some units with specific equipment, when every unit will be in different location and will follow different commander. - i think i easy to make an unit in editor then copy that unit and paste 100 more units in different locations, than copying every location of 100 units and paste in script one by one. Bu that is just for one city in map, but i think to put at least 10 city's, a mission like invasion. Thanks in advance.
×