tydansie 2 Posted December 25, 2021 Hey guys, I'm currently working on a Strategic Map with multiple missions, after having a read through some posts and youtube clips im still at a bit of a loss... So far, I've managed to create the strategic map, the missions and tasks. Once the mission is selected it is assigned to the player and the player can commence the mission. In the mission folder i have 3 x separate "Mission.sqf" files for each of the missions with the below code: M1 setTriggerActivation ["West", "NOT PRESENT", true]; sleep 5; deleteVehicle Mission; What I would like to know/learn/someone help me with is: 1. Once the mission is selected the screen fades in & out and the player is teleported to the starting location for the mission 2. a Custom group, for e.g 3 x Recon rifleman, is then assigned to the player with a custom loadout created by me 3. upon completion the group is deleted and the player is returned to the base with the strategic map. What code do I need to add to my Mission.sqf file? any help would be much appreciated. Share this post Link to post Share on other sites
tydansie 2 Posted December 29, 2021 *bump* Can it not be done? Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 Ok....so far i've managed to: *Player teleports to mission location *Player is assigned a custom loadout. * AI group is spawned and joins the player. How can I make the AI group spawn with a custom loadout? and how can I spawn specific AI instead of squads? This is what I Have so far in my mission.sqf M1 setTriggerActivation ["West", "NOT PRESENT", true]; sleep 5; deleteVehicle Mission; p1 setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; _aiGRP = [getPos player, WEST,(configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "SpecOps" >> "BUS_DiverTeam")] call BIS_fnc_spawnGroup; {[_x]joinSilent grpNull; [_x]joinSilent group player;} forEach units _aiGRP; Any help would be much appreciated guys... Share this post Link to post Share on other sites
pierremgi 4850 Posted December 31, 2021 Hello, you can spawn an array of units, like in example 3. You can even prepare a randomized array if needed (types of units and nbr of units). If the loadout is not perfect for your aim, just apply setUnitLoadout once the units are created. But, in this case, I suggest you use the createUnit command - first syntax. Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 So is this in the right track? M1 setTriggerActivation ["West", "NOT PRESENT", true]; sleep 5; deleteVehicle Mission; p1 setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; _unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"]; "B_rangeMaster_F" setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; {[_x]joinSilent grpNull; [_x]joinSilent group player;} forEach units _aiGRP; and then just repeat that for each unit and custom loadout I want? Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 Ok this is what I have so far... M1 setTriggerActivation ["West", "NOT PRESENT", true]; sleep 5; deleteVehicle Mission; p1 setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; _unit = group player createUnit ["B_Recon_F", position player, [], 0, "FORM"]; "B_Recon_F"; _unit = group player createUnit ["B_Recon_F", position player, [], 0, "FORM"]; "B_Recon_F"; _unit setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; {[_x]joinSilent grpNull; [_x]joinSilent group player;} forEach units _unit; So far this works but how do I set a different custom loadout for the 2nd B_Recon_F AI that is created/spawned?? Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 Sorry to keep posting...but this is now what I have/can do *Player teleports to strategic map mission module *BlackFade screen on teleportation with custom Operation name *Specific AI now spawns with player and joins the player after teleportation *AI is spawned with a custom loadout. M1 setTriggerActivation ["West", "NOT PRESENT", true]; sleep 5; deleteVehicle Mission; p1 setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; _unit = group player createUnit ["B_Recon_F", position player, [], 0, "FORM"]; "B_Recon_F"; _unit1 = group player createUnit ["B_Recon_F", position player, [], 0, "FORM"]; "B_Recon_F"; _unit setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; _unit1 setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; {[_x]joinSilent grpNull; [_x]joinSilent group player;} forEach units _unit; My next question is....When my AI spawn in with the custom loadout, they're low on Ammo, How do I make them spawn with "X" amount of magazines for the correct weapon? Any help would be appreciated. Share this post Link to post Share on other sites
pierremgi 4850 Posted December 31, 2021 You need to load magazines also! You can find them in config viewer... config weapons Or... easier, If you want a correct loadout, I suggest you to edit your units as you like (temporary) then run a preview, (player) aim the unit and copy the result of: getUnitLoadout cursorObject in debug console watch lines (don't point at primary weapon, it's a container by itself). Point at the unit. Share this post Link to post Share on other sites
jandrews 116 Posted December 31, 2021 This sounds like an interesting mission selection and set up. Have you considered making it for coop? If you don't mind would you share the mission when you're done? Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 3 hours ago, pierremgi said: You need to load magazines also! You can find them in config viewer... config weapons Or... easier, If you want a correct loadout, I suggest you to edit your units as you like (temporary) then run a preview, (player) aim the unit and copy the result of: getUnitLoadout cursorObject in debug console watch lines (don't point at primary weapon, it's a container by itself). Point at the unit. So I just type that in and run it "Local"? then copy and paste the loadout back into where I have the equipment? 2 hours ago, jandrews said: This sounds like an interesting mission selection and set up. Have you considered making it for coop? If you don't mind would you share the mission when you're done? It really is! This is my first mission....It may have been a bit advantageous of me but I'm doing well so far. It originally started off as a COOP mission and I've just been converting it to a single player version so I can learn a bit more about editing. I can always make it a COOP mission once I've completed the SP version, that part is simple (I think), All I would really need to do is make a respawn and perhaps put down some vehicles and an arsenal box. Yes I can share the mission once I'm done and you can have a look at how it's pieced together. Basically, it's a set of missions taking place at the same time as Kerry/Miller are on stratis during the East Wind Campaign. The missions are technically running alongside/in support of Alpha Team (Kerrys group). You take the role of Huntsmen 1-1 (A Nato Force Recon Team), So far I have 3 missions complete that just need the final touches with the scripts I'm now working on....An example of the type of mission is "Operation Neptune" which sees you and your team deployed in a Scuba assault role....and you have to plant explosives on the AAF Patrol Boats from under the water and destroy them to open up the waterways to extract to Altis. Share this post Link to post Share on other sites
pierremgi 4850 Posted December 31, 2021 4 hours ago, tydansie said: So I just type that in and run it "Local"? then copy and paste the loadout back into where I have the equipment? Just saying, for a correct setUnitLoadout array, you can set your loadout on a unit in editor, then preview (play) and aim at the unit. You grab the correct array as result of getUnitLoadout cursorObject (or cursorTarget) from watch line(s) of the debug console. Then, you have a workable array for setting loadout on any spawned unit, as you did above. Share this post Link to post Share on other sites
tydansie 2 Posted December 31, 2021 4 hours ago, pierremgi said: Just saying, for a correct setUnitLoadout array, you can set your loadout on a unit in editor, then preview (play) and aim at the unit. You grab the correct array as result of getUnitLoadout cursorObject (or cursorTarget) from watch line(s) of the debug console. Then, you have a workable array for setting loadout on any spawned unit, as you did above. Ok, I've tried that and I pasted the loadout into the mission.sqf but they're still spawning with no ammo, even though ammo is present ["20Rnd_556x45_UW_mag",4,20]. Anything else I can try? Share this post Link to post Share on other sites
pierremgi 4850 Posted January 1, 2022 10 hours ago, tydansie said: Ok, I've tried that and I pasted the loadout into the mission.sqf but they're still spawning with no ammo, even though ammo is present ["20Rnd_556x45_UW_mag",4,20]. Anything else I can try? What is your line of code? If I apply my method from an ammo bearer to a civilian, that works! my code looks like: civ1 setUnitLoadout [["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_B_CombatUniform_mcam",[["FirstAidKit",1],["30Rnd_65x39_caseless_mag",2,30],["Chemlight_green",1,1]]],["V_PlateCarrier1_rgr",[["30Rnd_65x39_caseless_mag",9,30],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",1,1]]],["B_AssaultPack_mcamo_Ammo",[["FirstAidKit",4],["30Rnd_65x39_caseless_mag",6,30],["100Rnd_65x39_caseless_mag",1,100],["NLAW_F",1,1],["HandGrenade",2,1],["MiniGrenade",2,1],["1Rnd_HE_Grenade_shell",3,1],["3Rnd_HE_Grenade_shell",1,3],["10Rnd_338_Mag",2,10],["20Rnd_762x51_Mag",2,20]]],"H_HelmetB_grass","G_Combat",[],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]] civ1 is now a clone of the ammo bearer (for loadout) Share this post Link to post Share on other sites
tydansie 2 Posted January 1, 2022 13 hours ago, pierremgi said: What is your line of code? If I apply my method from an ammo bearer to a civilian, that works! my code looks like: civ1 setUnitLoadout [["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_B_CombatUniform_mcam",[["FirstAidKit",1],["30Rnd_65x39_caseless_mag",2,30],["Chemlight_green",1,1]]],["V_PlateCarrier1_rgr",[["30Rnd_65x39_caseless_mag",9,30],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",1,1]]],["B_AssaultPack_mcamo_Ammo",[["FirstAidKit",4],["30Rnd_65x39_caseless_mag",6,30],["100Rnd_65x39_caseless_mag",1,100],["NLAW_F",1,1],["HandGrenade",2,1],["MiniGrenade",2,1],["1Rnd_HE_Grenade_shell",3,1],["3Rnd_HE_Grenade_shell",1,3],["10Rnd_338_Mag",2,10],["20Rnd_762x51_Mag",2,20]]],"H_HelmetB_grass","G_Combat",[],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]] civ1 is now a clone of the ammo bearer (for loadout) I did it the way you described through the debug console. _unit setUnitLoadout [["arifle_SDAR_F","","","",["20Rnd_556x45_UW_mag",20],[],""],[],["hgun_Pistol_heavy_01_black_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD",["11Rnd_45ACP_Mag",15],[],""],["U_B_survival_uniform",[["optic_NVS",1],["G_Tactical_Clear",1],["PiR_bint",3]]],["V_RebreatherB",[]],["B_AssaultPackSpec_rgr",[["PiR_bint",1],["ACE_Clacker",1],["DemoCharge_Remote_Mag",6,1],["20Rnd_556x45_UW_mag",4,20]]],"H_HelmetB_light_snakeskin","G_B_Diving",["Rangefinder","","","",[],[],""],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; Maybe because mine is a custom loadout where as yours is a vanilla loadout? Share this post Link to post Share on other sites
pierremgi 4850 Posted January 2, 2022 7 hours ago, tydansie said: Maybe because mine is a custom loadout where as yours is a vanilla loadout? Custom loadout are possible, as far as you equip from editor, then respect the max load of uniform, vest and backpack. I don't play with ACE mod, so I can't say if you are overloading your equipment or if you have some restriction due to your mods or scripts. Share this post Link to post Share on other sites
tydansie 2 Posted January 3, 2022 On 1/2/2022 at 5:30 PM, pierremgi said: Custom loadout are possible, as far as you equip from editor, then respect the max load of uniform, vest and backpack. I don't play with ACE mod, so I can't say if you are overloading your equipment or if you have some restriction due to your mods or scripts. Can't seem to find a work around, I gave them an all Vanilla loadout. They do have ammunition but are reporting "low ammo"....but for now it works. Share this post Link to post Share on other sites
tydansie 2 Posted January 4, 2022 For anyone playing along... So far I've managed to: *Player teleports to strategic map mission module *BlackFade screen on teleportation with custom Operation name and at whatever time of day I want to set the mission. *Specific AI now spawns with player and joins the player after teleportation *AI is spawned with a custom loadout. * Tasks are created and assigned. *Radio chat, no voices yet, considering for the future *Once tasks complete, move to an Exfil which Fades out and teleports player back to base in original loadout. coming along nicely 2 Share this post Link to post Share on other sites
pierremgi 4850 Posted January 4, 2022 On 1/3/2022 at 7:37 AM, tydansie said: Can't seem to find a work around, I gave them an all Vanilla loadout. They do have ammunition but are reporting "low ammo"....but for now it works. This report occurs sometimes for a reason I can't find. Seems like the AI doesn't "know" it has plenty of usable ammo. It's not automatic. Share this post Link to post Share on other sites
tydansie 2 Posted January 7, 2022 Alright so new question... I'm trying to add a image in on the strategic map mission, in the mission module it has "image" . I have a screenshot.jpg in the mission folder and have put the following in this setObjectTextureGlobal [0,"mission1.jpg"]; I've also tried creating an images folder and tried: this setObjectTexture [0, getMissionPath "images\nameOfTheFile.paa"]; does anyone have any ideas? Share this post Link to post Share on other sites
tydansie 2 Posted January 11, 2022 Hey guys, does anybody know how to display an image instead of using a black fade out? I'm currently using this: cutText ["", "BLACK OUT"]; cutText ["OPERATION LITTLE EAGLE", "BLACk FADED", 1.5]; But instead of a blackscreen I would like to use a custom image that fades out at the start of the mission Share this post Link to post Share on other sites
Maff 250 Posted January 11, 2022 4 minutes ago, tydansie said: Hey guys, does anybody know how to display an image instead of using a black fade out? I'm currently using this: cutText ["", "BLACK OUT"]; cutText ["OPERATION LITTLE EAGLE", "BLACk FADED", 1.5]; But instead of a blackscreen I would like to use a custom image that fades out at the start of the mission You can use BIS_fnc_dynamicText to display an image. Although, it doesn't fade out. Maybe you can get creative with the function? Share this post Link to post Share on other sites
tydansie 2 Posted January 11, 2022 2 minutes ago, Maff said: You can use BIS_fnc_dynamicText to display an image. Although, it doesn't fade out. Maybe you can get creative with the function? Just had a look, doesn't look like you can use an image with this? Can you provide an example? Share this post Link to post Share on other sites
Maff 250 Posted January 11, 2022 11 minutes ago, tydansie said: Just had a look, doesn't look like you can use an image with this? Can you provide an example? Sorry. My bad. ["<img image='IMAGE-PATH' size='4'/>"] spawn BIS_fnc_dynamicText; You will probably need to play around with "size" depending on the size of your image. Share this post Link to post Share on other sites
Maff 250 Posted January 11, 2022 On 1/4/2022 at 3:19 PM, pierremgi said: This report occurs sometimes for a reason I can't find. Seems like the AI doesn't "know" it has plenty of usable ammo. It's not automatic. Is this still an issue, @tydansie? I've found AI will report "low ammo" on mission start if they haven't been given a magazine in their primary weapon, or main weapon; Depending if they have a rifle, handgun or just a launcher. Share this post Link to post Share on other sites
tydansie 2 Posted January 11, 2022 1 hour ago, Maff said: Sorry. My bad. ["<img image='IMAGE-PATH' size='4'/>"] spawn BIS_fnc_dynamicText; You will probably need to play around with "size" depending on the size of your image. Thanks I'll give it a go! 1 hour ago, Maff said: Is this still an issue, @tydansie? I've found AI will report "low ammo" on mission start if they haven't been given a magazine in their primary weapon, or main weapon; Depending if they have a rifle, handgun or just a launcher. Yeah Its still an issue, they spawn with their custom loadout, they have full ammo etc but still report Low Ammo for whatever reason, I'm guessing it's a bug or something. Share this post Link to post Share on other sites