infiltrator_2k 29 Posted June 14, 2015 I've successfully managed to get a triggerActivation condition with an empty object's classname using the below code by grouping the object with the trigger and it also works in MP. However, this is only if I place the object in the trigger area before the mission starts, as if I carry the item into the trigger area in-game it doesn't activate. Why is this? Can someone please provide me with a method of getting a MP triggerActivation with an empty item please because it's driving me nuts try to achieve this. An object's name would be preferred to a classname to prevent cheating. handle = getpos thistrigger nearobjects ["Item_ItemMap",50];count handle != 0 Cheers Share this post Link to post Share on other sites
buliwyf 4 Posted June 14, 2015 Shouldn`t it be "ItemMap"? Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted June 14, 2015 (edited) Shouldn`t it be "ItemMap"? Well, that's partly correct as you'll read below, but for the createVehicle command, check here: https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EMPTY#Item_ItemMap But nearObjects won't return "Item_ItemMap". Instead it'll return the model of the map object which is "dummyweapon.p3d". You can get the "Item_ItemMap" if you perform a typeOf on the object. But if it's put on the ground, the engine puts it into a "GroundWeaponHolder", hence you'd need to search all GroundWeaponHolders in the area. So, put this into your trigger condition: [color=#FF8040]1 [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]([/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#7A7A7A]"GroundWeaponHolder"[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]typeOf[/b][/color] [color=#000000]_x[/color] [color=#8B3E2F][b]&[/b][/color][color=#8B3E2F][b]&[/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#FF0000]0[/color] [color=#8B3E2F][b]<[/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#7A7A7A]"ItemMap"[/color] [color=#8B3E2F][b]=[/b][/color][color=#8B3E2F][b]=[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color][color=#8B3E2F][b];[/b][/color] [color=#000000]false[/color] [color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] [color=#8B3E2F][b]([/b][/color][color=#191970][b]itemCargo[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#8B3E2F][b]}[/b][/color] [color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color][color=#8B3E2F][b];[/b][/color] [color=#000000]false[/color] [color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] [color=#8B3E2F][b]([/b][/color]thisTrigger [color=#191970][b]nearObjects[/b][/color] [color=#FF0000]50[/color][color=#8B3E2F][b])[/b][/color] [color=#8B3E2F][b])[/b][/color][/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. I hope this is what you're looking for. Have a nice Play, Johnny Edited June 14, 2015 by Heeeere's Johnny! Share this post Link to post Share on other sites
infiltrator_2k 29 Posted June 14, 2015 Well' date=' that's partly correct as you'll read below, but for the [i']createVehicle[/i] command, check here:https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EMPTY#Item_ItemMap But nearObjects won't return "Item_ItemMap". Instead it'll return the model of the map object which is "dummyweapon.p3d". You can get the "Item_ItemMap" if you perform a typeOf on the object. But if it's put on the ground, the engine puts it into a "GroundWeaponHolder", hence you'd need to search all GroundWeaponHolders in the area. So, put this into your trigger condition: [color=#FF8040]1 [color=#191970][b]isEqualTo[/b][/color] [color=#8B3E2F][b]([/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#7A7A7A]"GroundWeaponHolder"[/color] [color=#191970][b]isEqualTo[/b][/color] [color=#191970][b]typeOf[/b][/color] [color=#000000]_x[/color] [color=#8B3E2F][b]&[/b][/color][color=#8B3E2F][b]&[/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#FF0000]0[/color] [color=#8B3E2F][b]<[/b][/color] [color=#8B3E2F][b]{[/b][/color] [color=#191970][b]if[/b][/color][color=#8B3E2F][b]([/b][/color][color=#7A7A7A]"ItemMap"[/color] [color=#8B3E2F][b]=[/b][/color][color=#8B3E2F][b]=[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color][color=#8B3E2F][b];[/b][/color] [color=#000000]false[/color] [color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] [color=#8B3E2F][b]([/b][/color][color=#191970][b]itemCargo[/b][/color] [color=#000000]_x[/color][color=#8B3E2F][b])[/b][/color] [color=#8B3E2F][b]}[/b][/color] [color=#8B3E2F][b])[/b][/color] [color=#191970][b]exitWith[/b][/color] [color=#8B3E2F][b]{[/b][/color][color=#FF0000]1[/color][color=#8B3E2F][b]}[/b][/color][color=#8B3E2F][b];[/b][/color] [color=#000000]false[/color] [color=#8B3E2F][b]}[/b][/color] [color=#191970][b]count[/b][/color] [color=#8B3E2F][b]([/b][/color]thisTrigger [color=#191970][b]nearObjects[/b][/color] [color=#FF0000]50[/color][color=#8B3E2F][b])[/b][/color] [color=#8B3E2F][b])[/b][/color][/color] Kudos to Killzone_Kid for his SQF to BBCode Converter. I hope this is what you're looking for. Have a nice Play, Johnny That great, it works perfectly, although I've since discovered that the items I want to use i.e. briefcase are for decoration only and cannot be carried. Of course the items that can be used are available in the VA and VAS so it's a bit of a flaw as people can cheat on the task by placing down a readily available in the trigger area. Can I edit that code to change it from item classname to item name? Cheers Ian Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted June 14, 2015 Can I edit that code to change it from item classname to item name? I'm not sure if you mean my code or the code of VAS. Just in case you should mean whether you may edit the code: Of course you may do so. And I'd assume that you may also edit the code of VAS. However, the code I posted does already use the item name "ItemMap" while the class name is "Item_ItemMap". As I stated, you can use the class name for creating that object using createVehicle, but it doesn't help you beyond that, so you need to refer to the item name "ItemMap" if you want to check for the existence of that object. If you should however be refering to VAS's code, I can't tell you about that as I didn't feel the need to use it, yet. Share this post Link to post Share on other sites
infiltrator_2k 29 Posted June 15, 2015 I'm not sure if you mean my code or the code of VAS. Just in case you should mean whether you may edit the code: Of course you may do so. And I'd assume that you may also edit the code of VAS.However' date=' the code I posted does already use the item name "ItemMap" while the class name is "Item_ItemMap". As I stated, you can use the class name for creating that object using [i']createVehicle[/i], but it doesn't help you beyond that, so you need to refer to the item name "ItemMap" if you want to check for the existence of that object. If you should however be refering to VAS's code, I can't tell you about that as I didn't feel the need to use it, yet. I understand where you're coming from, but the item "ItemMap" is openly available in player's inventory and in VA and VAS, so all a player has to do is remove the map from their inventory to trigger the task complete. I've basically created an deep sea task that requires a player to dive and retrieve an item - preferably the briefcase - so they can return it to HQ and trigger the event. I know Iceman77 helped in creating a laptop recovery mission that used the addaction and deleteVehicle on decorative items, but I don't think it works in MP, or at least that's what I assume as these scripts seem to seldom support MP. If it does work MP then it's perfect for what I need. Share this post Link to post Share on other sites