infection 1 Posted August 4, 2013 Hello, I'm looking for a way to make it so you can use an item in your inventory, I downloaded Scorch's Inventory Items (http://www.armaholic.com/page.php?id=21689) and played around with it a bit. I looked at Dayz's Arma 2 code on how all the use actions were added and it was like this class ItemActions { class Use { text = $STR_texthere; script = "spawn function;"; }; }; I tried this with the bandage in the item pack class sc_bandage: ItemWatch { displayName = "Bandage"; count = 1; class ItemInfo { mass = 1; }; picture = "\scorch_invitems\images\bandage.paa"; descriptionShort = ""; class ItemActions { class Use { text = "Use Bandage"; script = "spawn item_hint;"; }; }; }; I had no luck so far tho, I tried looking at how first aid kits were done but no luck there either. Anyone got any idea how I can go about doing this? Share this post Link to post Share on other sites
Colenando 10 Posted November 19, 2014 I'm attempting to do the exact same thing bud. If I figure it out, I'll come back and post here. I need to accomplish this as I'm doing a total conversion mod for Arma 3 and this is a must for my spec crafting system. There is a way to do it for sure... just have to figure out how ;) Share this post Link to post Share on other sites
lappihuan 178 Posted November 19, 2014 This Thread could help you guys. Share this post Link to post Share on other sites
dr_strangepete 6 Posted November 19, 2014 they are talking about the right-click popup menu that dayz has for inventory use. dayz does it roughly by finding the display of the inventory dialog, then adding click event handlers to intercept and show their own popup. The class ItemActions{} is just a custom one they created, no vanilla functionality. pretty clever. Share this post Link to post Share on other sites
Colenando 10 Posted December 1, 2014 Well I figured out how to fire scripts from items directly in the inventory, but what I'm after now is the ability (like DayZ) to fire a script from the "Use" key which is F in arma or spacebar or mouse click. If I can figure that out, I'll have axes and other melee weapons working in full in Arma 3. I've tried everything :( This is an example of what DayZ does and I wish it was vanilla... would have been done a week ago. I know the script works as I tried running it via the debug editor.. but nothing seems to fire it from a weapon via the "use" key :( class ItemActions { class Use { text = "weeee"; script = "spawn player_chopWood;"; }; class Toolbelt { text = "Remove from Toolbelt"; script = "spawn player_addToolbelt;"; use[] = {"ItemHatchet"}; output[] = {"MeleeHatchet"}; }; }; Share this post Link to post Share on other sites
GKell 0 Posted September 22, 2017 Hey Gents, I am trying to create an inventory object that you can have in say your backpack, drop on the ground, and then have a scroll wheel action. I have made the item, but i am having trouble with doing the userActions. I have made 2 objects that can be places in the editor with these functions, but i am trying to create a smaller portable station that someone can carry with them. I Was thinking that maybe i have to make a vehicle and then in the CfgWeapons call the vehicle when i create the item? If anyone can help please let me know. I am able to provide coding if you want to see what I have so far. Cheers Share this post Link to post Share on other sites