Muzzle Flash Bug: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ")
m (Some wiki formatting)
Line 1: Line 1:
{{GameCategory|ofp|Modelling}}
__NOTOC__
== The Problem ==
== The Problem ==


Line 7: Line 7:
== The Solution ==
== The Solution ==


This Problem has two solutions. You may have to do both.
This problem has two solutions. You may have to do both.


=== Solution 1 ===


=== A) ===
Open your model in [[Oxygen 2]] and make sure that the selection [[zasleh]] does infact highlight the model part of the muzzle flash on your weapon. Do this in all the [[LOD]]s.
Open your model in [[Oxygen 2]] and make sure that the selection [[zasleh]] does infact highlight the model part of the muzzle flash on your weapon. Do this in all the [[LOD]]s.


If in some [[LOD]] the muzzle flash selection does '''not''' highlight when clicking the [[zasleh]] selection, select it on your model, rightclick [[zasleh]] in the selections window and select '''redefine selection'''.
If in some [[LOD]] the muzzle flash selection does '''not''' highlight when clicking the [[zasleh]] selection, select it on your model, rightclick [[zasleh]] in the selections window and select '''redefine selection'''.


=== Solution 2 ===


=== B) ===
In your [[Config.cpp]] (for OFP) or [[model.cfg]] (for {{arma1}}), you should include (or already have) a CfgModels class, which includes the weapon name as classes. For instance, your weapon model is named "MyM16A2.p3d", then the {{hl|CfgModels}} section should look as following:


In your [[Config.cpp]] (for OFP) or [[model.cfg]] (for ArmA), you should include (or already have) a CfgModels class, which includes the weapon name as classes. For instance, your weapon model is named "MyM16A2.p3d", then the CfgModels section should look as following:
<syntaxhighlight lang="cpp">
class CfgModels
{
class Default {};
class Weapon: Default {};
class MyM16A2: Weapon {};
};
</syntaxhighlight>


class CfgModels
This should be inserted into your [[Config.cpp]] (only for {{ofp}}) '''before''' your {{hl|CfgVehicles}} or {{hl|CfgWeapons}} sections and you have to put it in there '''before''' [[Binarize|binarizing]] the model.
{
class Default {};
class Weapon: Default {};
class MyM16A2: Weapon {};
};




This should be inserted into your [[Config.cpp]] (only for OFP) '''before''' your CfgVehicles or CfgWeapons sections and you have to put it in there '''before''' [[Binarize|binarizing]] the model.
{{GameCategory|ofp|Modelling}}

Revision as of 13:37, 13 June 2022

The Problem

This problem may occur for addonmakers in the form of the muzzle flash of a weapon model is visible at all times ingame, and does not simply flash when fired.


The Solution

This problem has two solutions. You may have to do both.

Solution 1

Open your model in Oxygen 2 and make sure that the selection zasleh does infact highlight the model part of the muzzle flash on your weapon. Do this in all the LODs.

If in some LOD the muzzle flash selection does not highlight when clicking the zasleh selection, select it on your model, rightclick zasleh in the selections window and select redefine selection.

Solution 2

In your Config.cpp (for OFP) or model.cfg (for Armed Assault), you should include (or already have) a CfgModels class, which includes the weapon name as classes. For instance, your weapon model is named "MyM16A2.p3d", then the CfgModels section should look as following:

class CfgModels
{
	class Default {};
	class Weapon: Default {};
	class MyM16A2: Weapon {};
};

This should be inserted into your Config.cpp (only for Operation Flashpoint) before your CfgVehicles or CfgWeapons sections and you have to put it in there before binarizing the model.