Jump to content
Sign in to follow this  
hatifnat

CfgWeapon simulations

Recommended Posts

Hello, I recently noticed that CfgWeapon have a variable called "simulation" just like in the CfgAmmo that changes how the item acts.

And that by adding "simulation = "NVGoggles";" will remove many properties and make the item act as a night vision goggle, where you need to press N and a night vision effect will show up.

Example:

class cfgWeapons
{
class Default;
class Binocular: Default //Edit the binocular item
{
	modelOptics = ""; //Removes the optic texture
	simulation = "NVGoggles"; //Make the item work like NVGoggles
};
};

Then add "this AddWeapon "Binocular";" in the units initialization.

Will make you have an item with the appearance of Binoculars but you can't use it zoom into the battlefield and you use it as night visions by pressing N after you drop your default NVG instead.

570Xp.png

I just wonder if there a way to edit simulation types or create new ones? And how.

I am asking this because I cannot find this information anywhere.

-Hatifnat

Edited by Hatifnat
Added example

Share this post


Link to post
Share on other sites

nope simulations are hardcoded into the engine

Share this post


Link to post
Share on other sites

Ok, but how do Classes within weapon classes actually work? Like so:

class cfgWeapons
{
class Default;
class MyWeapon: Default
{
	//Stuff here
	class ClassInWepClass
	{
		//More stuff here
		class ClassInClassInWepClass
		{
			//More stuff here x2
		};
	};
};
};

Edited by Hatifnat

Share this post


Link to post
Share on other sites

nope. at least not what I assume you are trying to do here.

better add some context to avoid confusion

Share this post


Link to post
Share on other sites

I am wondering what they do. Do you run those classes using SQF, an event or something else?

I am trying to make something like a NVG just with a IR vision instead for testing. I figured out I could make a weapon with a IR sight without any zoom that don't take any inventory space, and got confused when I saw the OpticsModes class in an addon.

(I am kinda new to arma 2 modding)

Edited by Hatifnat

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  

×