papaga 1 Posted July 26, 2012 I'm trying to integrate my own first aid system into a mission but although the core of the script works, I can not implement it in the way I want. The method in which I'm working on is creating a new item object (like the map or the radio) that can be used and edited as the rest of weapons or ammo. The following script is called from init.sqf (_MedKitHandle = player execVM "MedKit\MedkitMain.sqf";) and as i said the core itself is tested but I can't create the new class, it gives me an error "no entry bin\config.bin/cfgweapons.itemmedkit". What am I doing wrong? [b]//MedkitMain.sqf[/b] MedKitEnabled = true; // Enables or disables the MedKit system. MedKitUnits = 2; // Number of supplies available. MedKitHealingTime = 5; // Time needed to heal the unit. MedKitUsageTime = 60; // Time until becomes available again. class CfgWeapons { access = 1; class Default {}; class ItemCore: Default {}; class ItemMedKit: ItemCore { model = "MedKit\mag_univ.p3d"; displayName = "Medical Kit"; descriptionShort = "Personal medical kit. Contains supplies for 2 uses."; picture = "MedKit\MedKitIcon.paa"; Type = "2 * 131072"; }; }; _MedKitAction = player addAction [ "Use Medical Kit", "MedKit\MedKitAction.sqf", "", 6, false, true, "", "(_target == player) && ((getDammage _target) > 0) && MedKitEnabled && (MedKitUnits > 0)" ]; Share this post Link to post Share on other sites
igneous01 19 Posted July 26, 2012 you cant create a new class of object or a new entry in a config file by running a script. You need to create an addon which contains a cfg file, which is where you would define this. Although im not sure if thats what you doing (in which case, you might get more help in the addons section) Share this post Link to post Share on other sites
papaga 1 Posted July 26, 2012 Thanks, I was afraid of that. I'm trying to do it in a mission environment, not as addon. Nevermind, is there a way to integrate an addon into a mission?. Share this post Link to post Share on other sites
kylania 568 Posted July 26, 2012 Not yet. :) Better to "fake it" by using either existing items if you must have an actual item or just keep track of how many kits people have with a variable, which you already do it seems. Share this post Link to post Share on other sites
papaga 1 Posted July 26, 2012 Unfortunately seems that there are no similar items to do the trick. Only the items used in the main campaign, some photos, the dogtags, ... http://browser.six-projects.net/cfg_weapons/classlist?version=58 Share this post Link to post Share on other sites
igneous01 19 Posted July 26, 2012 you could try a simple gui with a picture of the item in question, maybe a few buttons that do stuff. Its not the greatest idea, considering the gui features are really limited and creating them is a painful process. but it might fill the void of not having a physical item in game. Share this post Link to post Share on other sites
papaga 1 Posted July 26, 2012 Finally it has been done as addon. http://www.flickr.com/photos/83556626@N07/7652348690/ Share this post Link to post Share on other sites
igneous01 19 Posted July 26, 2012 very nice, interesting to see how your system works. will you be implementing an addon version of your wounding system as well? Share this post Link to post Share on other sites
kylania 568 Posted July 27, 2012 Nice looking icon! Neat that each has two uses as well. Good job, glad you got it working. Share this post Link to post Share on other sites
araxiel 2 Posted August 7, 2012 Nice! I was searching for exactly such an item. Is there the possibility that you release it? Share this post Link to post Share on other sites