Jump to content
Sign in to follow this  
papaga

Help with mission and item creation

Recommended Posts

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

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

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

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

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×