Gurman01 10 Posted August 13, 2013 Hi Guys, I would like a 'succeed task' when the player takes a specific secondary weapon from a dead enemy soldier.... I have searched for the script I need in relation to this and there are a few posts that are close but I cannot seem to get them to work. I can get this to work when a player picks up a rucksack with the weapon contained within it but not from the body or taking direct from the rucksack. I am still fairly new to all this but enjoying every minute, if you would be kind enough to write out the full code I need so that I can simply copy and paste into the relevant box, it would be muchly appreciated. Regards Gurman Share this post Link to post Share on other sites
kylania 568 Posted August 13, 2013 Trigger condition of: "launch_RPG32_F" in weapons player This condition would also work: player hasWeapon "launch_RPG32_F" 1 Share this post Link to post Share on other sites
Gurman01 10 Posted August 13, 2013 Thanks for your prompt response... I shall go try this Share this post Link to post Share on other sites
kylania 568 Posted August 13, 2013 Just make sure that trigger is Synchronized with your setTaskState (Succeeded) intel module and that should complete a "find an AT weapon" task. 1 Share this post Link to post Share on other sites
Gurman01 10 Posted August 13, 2013 Thanks It works (not that I should be surprised), Its mind boggling that there are so many variations of script('in weapons', 'hasWeapon') , where can I find the lists of these? I know about the kit lists on SIX Config and the new script commands page on BIS.. Share this post Link to post Share on other sites
kylania 568 Posted August 13, 2013 Here's the comref. All the commands you can use. http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 1 Share this post Link to post Share on other sites
Gurman01 10 Posted August 13, 2013 Again, Thank you... Just what I have been looking for! Share this post Link to post Share on other sites
Von Quest 1163 Posted August 14, 2013 (edited) How would you use Item? "sc_cellphone" in backpack player; ? There is no hasItem in list. Keep getting errors. UPDATE: -------- Got it! "sc_cellphone" in UniformItems player; Working on a system to Hack into Networks, Towers, Cellphones, etc. Edited August 14, 2013 by Goblin Fixed/Found Share this post Link to post Share on other sites
kylania 568 Posted August 14, 2013 (edited) Keep in mind UniformItems only checks for items (and magazines) in the Uniform. If they moved the cellphone to their vest Uniformitems wouldn't pick it up, you'd have to use VestItems instead. Using: "sc_cellphone" in items player should work for either (though items doesn't pick up magazines like UniformItems and VestItems and BackpackItems do but it does seem to pick up weapons, odd). Also remember Conditions have no trailing ; Edited August 14, 2013 by kylania Share this post Link to post Share on other sites
Von Quest 1163 Posted August 14, 2013 As always, you're fantastic. Works. Was just going to use Uniform, Backpack and Vest. All three. 1. What is trailing? oh, you mean the ; ? 2. How do you STOP the Script IF you were to remove that Item? Share this post Link to post Share on other sites
OnionTerror 0 Posted December 13, 2017 Hate to revive a dead topic, But im trying to do the same thing but with the Mortar gear( i.e. I_Mortar_01_weapon_F and I_MORTAR_01_support_F), would like to trigger the task once both parts of the mortar have been picked up but so far nothing is working. Perhaps mortar pieces fall into some other category in the scripting commands? Thanks! Share this post Link to post Share on other sites
johnnyboy 3797 Posted December 13, 2017 Maybe the mortar parts are items. To find out, as player pick up the two pieces, then in the console type this and see if you see the mortar parts listed in the output. assignedItems player If they are in the array returned by assignedItems, then use those names in your trigger condition to check if those items are in array returned by unit assignedItems. Share this post Link to post Share on other sites
OnionTerror 0 Posted December 14, 2017 (edited) Thanks for your reply Johnnyboy, picking up the tube and using the assigneditems command only returned items such as gps, NVGs, etc. As an experiment i also tried using additem when the player enters a trigger area, however this proved fruitless. perhaps mortar pieces are classed as a vehicle? in the editor the mortar pieces and other such weapons are classed as dismantled weapons, but ive no idea how to call such items looking in the config viewer, the mortar pieces are in the vehiclecfg folder. EDIT: Got it, its done with *variable* addbackpack "I_Mortar_01_weapon_F" Edited December 14, 2017 by OnionTerror Found a solution Share this post Link to post Share on other sites
johnnyboy 3797 Posted December 14, 2017 Good job. Way to perservere. So how will you find the mortars with a trigger condition? items? assignedItems? weapons? backpackItems? Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted December 14, 2017 Take eventhandler could work as well. Cheers Share this post Link to post Share on other sites
OnionTerror 0 Posted December 20, 2017 Sorry for the late reply fellas, after testing the scenario some more it became apparent that my initial plan want going to work, so im in the process of rethinking how i want to do it. the second part of this was to move to a specific position and set the mortar up there and have an area trigger detect when it had been assembled. this presented another problem as i had no idea how to do this, but then someone suggested using the event trigger handle weaponassembled or something. however, im not that good at scripting, and event handlers are an area i have not explored! EDIT: Eventhandler- weaponassembled Share this post Link to post Share on other sites
BULLWAR 1 Posted February 7, 2023 hi, If I wanted as a condition to have equipped a "V_RebreatherB" I should write Vest or vestitem? Example: player vest "V_RebreatherB" ? Share this post Link to post Share on other sites
Harzach 2518 Posted February 7, 2023 2 hours ago, BULLWAR said: hi Vest. There is no command "vestItem." vest player isEqualTo "V_RebreatherB"; 1 1 Share this post Link to post Share on other sites
BULLWAR 1 Posted February 7, 2023 6 hours ago, Harzach said: Vest. There is no command "vestItem." vest player isEqualTo "V_RebreatherB"; thx Harzach Share this post Link to post Share on other sites