PDA

View Full Version : Muzzleflash in shadow!



Gummi
Feb 28 2003, 23:57
When I try my gun ingame everything works good, but the shadow is messed up, the muzzleflash always shows up on it. How can i fix that?

the LodNoShadow property is in LOD 0.35 0.7 and view pilot.

thx http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

SelectThis
Mar 6 2003, 00:11
Select the muzzle flash faces and go to Face Properties in O2, make sure the "no shadow" box is totally unchecked (it may be black or greyed, so just keep clicking until it's empty).

Do this for all the lods...

*grumbles to self about missing a lod in the BAS M240*...

SelectThis

PicVert
Mar 13 2003, 06:26
It's config.cpp mistake you have to define CfgModel inside it.

Tanelorn
Mar 14 2003, 22:41
PicVert, I don't think that's the problem or he would have complained about the muzzle flash being visible on the gun itself.

I think your cfgModels section is correct. I've never messed with the special face properties other than setting damage material values, so sorry I can't confirm a correct answer.

Gummi
Mar 15 2003, 13:30
the shadow thing is not a problem anymore,
but can u tell me why the muzzleflash on the gun on my car always shows and the lights of the car also.

im trying to make a hmmwv with MG but these are my proglems.

thx

PicVert
Mar 15 2003, 16:58
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Tanelorn @ Mar. 15 2003,01:41)</td></tr><tr><td id="QUOTE">PicVert, I don&#39;t think that&#39;s the problem or he would have complained about the muzzle flash being visible on the gun itself.[/QUOTE]<span id='postcolor'>
I assume your right, it&#39;s inside the model...

You have put your flash inside le Lod of your shadow ...

It&#39;s a limitation of OFP you can&#39;t have shadow for muzzle flash.

look in original M16 you don&#39;t have shadow for flash.

if you have all : flash and shadow viewed in game do that : for shdow see in top of post and for the flash it&#39;s in cfgModel

you have to make cfgModel like that :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgModels
{
class Default{};
class Weapon&#58; Default{};
class Your_model0 &#58; Weapon{};
class Your_model1 &#58; Weapon{};
class Your_model2 &#58; Weapon{};
class Your_model3 &#58; Weapon{};
};
[/QUOTE]<span id='postcolor'>

Your_model0 is the name of you p3d file for your weapon, then 1 and 2 and 3 is for your other one (if you have).

Gummi
Mar 15 2003, 17:44
the flash is always on. here is a part of config:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class Gummis_GMI_odes_hmw
{
units&#91;&#93; = {GMI_odes_hmw};
weapons&#91;&#93; = {Browning_hmwo};
requiredVersion = 1.75;
};

};



class CfgModels
{
class default {};
class Weapon&#58; Default{};
class Browning_hmwo &#58; Weapon{};

class Vehicle&#58; default {};
class Car&#58; Vehicle {};
class HMMWV&#58; Car {};
class JeepMG&#58; HMMWV {};
class GMI_odes_hmw&#58; JeepMG {};
};


class CfgWeapons
{

class Default{}
class MGun&#58; Default{};
class MachineGun7_6&#58; MGun{};
class MachineGun12_7&#58; MachineGun7_6{};
class Browning_hmwo&#58; MachineGun12_7
{
ammo=&#34;Bullet12_7&#34;;
sound&#91;&#93;={&#34;Weapons&#92;M60mgun&#34;,3.162278,1};
count=750;
opticsZoomMin=0.3000;
opticsZoomMax=0.3000;
};
};
[/QUOTE]<span id='postcolor'>

PicVert
Mar 15 2003, 18:00
it&#39;s your model or original one ? with scrpting for mounting MG on HHMW ?

the name of class XXXX: weapon{}; in cfg model must is the same of your XXX.p3d inside of your XXX.pbo

this is the original cfgvehicles for MGjeep :


</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class JeepMG &#58; Jeep
{
displayName=&#34;&#036;STR_DN_JEEP_MG&#34;;
model=&#34;Jeep_mg.p3d&#34;;
picture=&#34;ijeepmg.paa&#34;;
gunnerAction=&#34;ManActJeepGunner&#34;;
hasGunner=1;
castGunnerShadow=1;
ejectDeadGunner=1;
castDriverShadow=1;
driverIsCommander=1;
scope=2;
weapons&#91;&#93;={&#34;Browning&#34;};
magazines&#91;&#93;={&#34;Browning&#34;};
gunnerOpticsModel=&#34;optika_empty&#34;;
unitInfoType=unitinfosoldier;
transportSoldier=1;
class Turret
{
gunAxis=&#34;OsaHlavne&#34;;
turretAxis=&#34;OsaVeze&#34;;
soundServo&#91;&#93;={};
gunBeg=&#34;usti hlavne&#34;;
gunEnd=&#34;konec hlavne&#34;;
minElev=-5;
maxElev=40;
minTurn=-360;
maxTurn=360;
body=&#34;OtocVez&#34;;
gun=&#34;OtocHlaven&#34;;
};
class ViewGunner
{
initAngleX=5;
minAngleX=-30;
maxAngleX=30;
initAngleY=0;
minAngleY=0;
maxAngleY=0;
initFov=0.700000;
minFov=0.420000;
maxFov=0.850000;
};
class MGunClouds &#58; WeaponCloudsMGun
{
};
};
[/QUOTE]<span id='postcolor'>

Gummi
Mar 15 2003, 23:04
i made a hmmwv model and placed a MG turret on it. does the name of the gun have to be the same as the name of the car model inside the PBO? are you saying that?

if u want the whole config
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class Gummis_GMI_odes_hmw
{
units&#91;&#93; = {GMI_odes_hmw};
weapons&#91;&#93; = {Browning_hmwo};
requiredVersion = 1.75;
};

};



class CfgModels
{
class default {};
class Weapon&#58; Default{};
class Browning_hmwo &#58; Weapon{};

class Vehicle&#58; default {};
class Car&#58; Vehicle {};
class HMMWV&#58; Car {};
class JeepMG&#58; HMMWV {};
class GMI_odes_hmw&#58; JeepMG {};
};


class CfgWeapons
{

class Default{}
class MGun&#58; Default{};
class MachineGun7_6&#58; MGun{};
class MachineGun12_7&#58; MachineGun7_6{};
class Browning_hmwo&#58; MachineGun12_7
{
ammo=&#34;Bullet12_7&#34;;
sound&#91;&#93;={&#34;Weapons&#92;M60mgun&#34;,3.162278,1};
count=750;
opticsZoomMin=0.3000;
opticsZoomMax=0.3000;
};
};


class CfgVehicles
{

class All {};
class AllVehicles&#58; All {};
class Land&#58; AllVehicles {};
class LandVehicle&#58; Land {};
class Car&#58; LandVehicle {};
class HMMWV&#58; Car {};
class JeepMG&#58; HMMWV {};

class GMI_odes_hmw&#58; JeepMG
{
displayName=&#34;GMI HMMWV &#40;w MG/open&#41;&#34;;
model= &#92;GMI_OpenHumrDes&#92;openhmw;

side=1;
crew=&#34;SoldierWB&#34;;
maxSpeed=150;
picture=&#92;humr&#92;ihmmwv.paa;
transportSoldier=3;
hasGunner=1;
driverAction=&#34;ManActJeepDriver&#34;;
gunnerAction=&#34;ManActM113Gunner&#34;;
cargoAction&#91;&#93;={&#34;ManActJeepCoDriver&#34;,&#34;ManActJeepCoD riverBack&#34;};
typicalCargo&#91;&#93;={Soldier, SoldierM60, SoldierLAW, Officer};
castGunnerShadow=1;
castDriverShadow=1;
driverIsCommander=1;
hideUnitInfo=0;
armor = 80;
type=VArmor;
cost=100000;
dammageHalf&#91;&#93;=
{
jeep4x4_glass.paa,jeep4x4_glassB.paa,
jeep_kab_sklo1.paa,jeep_kab_sklo1B.paa,
jeep_kab_sklo2.paa,jeep_kab_sklo2B.paa,
scud_sklo.paa,scud_skloB.paa,
scud_sklo2.paa,scud_sklo2B.paa,
scud_sklo3.paa,scud_sklo3B.paa,
scud_sklo4.paa,scud_sklo4B.paa
};
dammageFull&#91;&#93;=
{
jeep4x4_glass.paa,jeep4x4_glassB.paa,
jeep_kab_sklo1.paa,jeep_kab_sklo1B.paa,
jeep_kab_sklo2.paa,jeep_kab_sklo2B.paa,
scud_sklo.paa,scud_skloB.paa,
scud_sklo2.paa,scud_sklo2B.paa,
scud_sklo3.paa,scud_sklo3B.paa,
scud_sklo4.paa,scud_sklo4B.paa
};
armorGlass=0.5;
armorWheels=0.1;
turnCoef=3.200000;
nightVision=1;
soundEngine&#91;&#93;={&#92;humr&#92;HMMWVengine,db-25,1.25};
scope=2;
weapons&#91;&#93;={&#34;Browning_hmwo&#34;};
magazines&#91;&#93;={&#34;Browning_hmwo&#34;};
gunnerOpticsModel=&#34;optika_empty&#34;;

class Reflectors
{
class Left
{
color&#91;&#93;={0.800000,0.800000,1.000000,1.000000};
ambient&#91;&#93;={0.070000,0.070000,0.070000,1.000000};
position = &#34;L svetlo&#34;;
direction = &#34;Konec L svetla&#34;;
hitpoint = &#34;L svetlo&#34;;
selection = &#34;L svetlo&#34;;
size = 0.7;
brightness = 0.43;
};
class Right
{
color&#91;&#93;={0.800000,0.800000,1.000000,1.000000};
ambient&#91;&#93;={0.070000,0.070000,0.070000,1.000000};
position = &#34;P svetlo&#34;;
direction = &#34;Konec P svetla&#34;;
hitpoint = &#34;P svetlo&#34;;
selection = &#34;P svetlo&#34;;
size = 0.7;
brightness = 0.43;
};
};


class TransportWeapons
{
class M16_wp_1
{
weapon=&#34;M16&#34;;
count=6;
};
};

class TransportMagazines
{
class M16_am_1
{
magazine=&#34;M16&#34;;
count=24;
};
};

class TurretBase
{
gunAxis=&#34;osa hlavne&#34;;
turretAxis=&#34;osa veze&#34;;
soundServo&#91;&#93;={};
gunBeg=&#34;usti hlavne&#34;;
gunEnd=&#34;konec hlavne&#34;;
minElev=-18;
maxElev=35;
minTurn=-360;
maxTurn=360;
body=&#34;OtocVez&#34;;
gun=&#34;OtocHlaven&#34;;
};
class Turret&#58; TurretBase
{
};


};
};
[/QUOTE]<span id='postcolor'>

PicVert
Mar 16 2003, 02:03
http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wow.gif4--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Gummi @ Mar. 16 2003,02http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wow.gif4)</td></tr><tr><td id="QUOTE">i made a hmmwv model and placed a MG turret on it. does the name of the gun have to be the same as the name of the car model inside the PBO? are you saying that ?[/QUOTE]<span id='postcolor'>
Ok it&#39;s not by script...

first I saw that you have put the wrong class for JeepMG look in my last post. You have to corect that in first and make class turret in place of turretbase (forget turretbase).

In the lod that you using for shadow clear the zasleh selection and planes.

and work a little with your eyes and your brain... http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif ***

the cfg models for JeepMG is :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgModels
{
class Default
{
sections&#91;&#93;={};
sectionsInherit=&#34;&#34;;
};
class Vehicle &#58; Default
{
sections&#91;&#93;={&#34;cislo&#34;,&#34;grupa&#34;,&#34;side&#34;,&#34;sektor&#34;,&#34;clan&#34; ,&#34;podsvit pristroju&#34;,&#34;poskozeni&#34;,&#34;L svetlo&#34;,&#34;P svetlo&#34;,&#34;zasleh&#34;};
};
class Car &#58; Vehicle
{
sectionsInherit=&#34;Vehicle&#34;;
sections&#91;&#93;={&#34;ammo&#34;,&#34;sklo predni p&#34;,&#34;sklo predni l&#34;,&#34;zadni svetlo&#34;,&#34;brzdove svetlo&#34;};
};
class jeep_mg &#58; Car
{
};
};
[/QUOTE]<span id='postcolor'>

Now you have all that you want.

The weapon is not defined on cfgmodels... Like a Tank or Plane. http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif

I hope you give me a credit for your car http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif
tell me when you&#39;ve finished your work.

Gummi
Mar 16 2003, 17:31
im going nuts, this is just not working. final it will maybe work if you would post a whole config like you think it has to be. http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif

PicVert
Mar 16 2003, 19:07
this is the original cpp for JeepMG :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2


class CfgModels
{
class Default{};
class Vehicle &#58; Default{};
class Car &#58; Vehicle{};
class jeep_mg &#58; Car{};
class VH_XXXXXXX &#58; jeep_mg{}; //model name &#40;without &#34;.p3d&#34;&#41; **must be the same of your pbo too**
};


class CfgPatches
{
class VH_XXXXXXX //name of your model and your &#34;.pbo&#34;
{
units&#91;&#93; = {VH_XXXXXXX}; //name of class cfgvehicles for yours and for the model and &#34;.pbo&#34;
weapons&#91;&#93; = {MG_XXXX}; //name of class weapons for yours
requiredVersion = 1.75;
requiredAddons&#91;&#93; = {BIS_Resistance};
};
};


class CfgWeapons
{
class Default{};
class MGun &#58; Default
class MachineGun7_6 &#58; MGun{};
class MachineGun12_7 &#58; MachineGun7_6{};
class Browning &#58; MachineGun12_7{};
class MG_XXXX &#58; Browning //weapons name &#40;and magazine if you dont make an other one&#41;
{
ammo=&#34;Bullet12_7&#34;;
sound&#91;&#93;={&#34;Weapons&#92;m2-50-loop&#34;,31.622778,1};
};
};


class cfgvehicles
{
class JeepMG &#58; Jeep
class XXXXXX &#58; JeepMG
{
displayName=&#34;XXXXXXXXX&#34;; //name of vehicle in game
model=&#34;VH_XXXXXXX.p3d&#34;; //name of your model
picture=&#34;XXXXXXX.paa&#34;; //picture of your vehicle in game
gunnerAction=&#34;ManActJeepGunner&#34;;
hasGunner=1;
castGunnerShadow=1;
ejectDeadGunner=1;
castDriverShadow=1;
driverIsCommander=1;
scope=2;
weapons&#91;&#93;={&#34;MG_XXXX&#34;}; //name of class weapon used like &#58; MG_XXXX
magazines&#91;&#93;={&#34;MG_XXXXmag&#34;}; //name of class weapon magazine used like &#58; MG_XXXXmag
gunnerOpticsModel=&#34;optika_empty&#34;;
unitInfoType=unitinfosoldier;
transportSoldier=1;
class Turret
{
gunAxis=&#34;OsaHlavne&#34;;
turretAxis=&#34;OsaVeze&#34;;
soundServo&#91;&#93;={};
gunBeg=&#34;usti hlavne&#34;;
gunEnd=&#34;konec hlavne&#34;;
minElev=-5;
maxElev=40;
minTurn=-360;
maxTurn=360;
body=&#34;OtocVez&#34;;
gun=&#34;OtocHlaven&#34;;
};
class ViewGunner
{
initAngleX=5;
minAngleX=-30;
maxAngleX=30;
initAngleY=0;
minAngleY=0;
maxAngleY=0;
initFov=0.700000;
minFov=0.420000;
maxFov=0.850000;
};
class MGunClouds &#58; WeaponCloudsMGun
{
};
};


class CfgNonAIVehicles
{
class ProxyCrew{};
class ProxyDriver &#58; ProxyCrew{};
class ProxyGunner &#58; ProxyCrew{};
class ProxyCargo &#58; ProxyCrew{};

class ProxyXXXXX &#58; ProxyDriver{}; //XXXXX = proxy for driver in your model &#40;.p3d&#41;
class ProxyXXXXX &#58; ProxyGunner{}; //XXXXX = proxy for gunner in your model &#40;.p3d&#41;
class ProxyXXXXX &#58; ProxyCargo{}; //XXXXX = proxy for Co-driver soldier in your model &#40;.p3d&#41;
class ProxyXXXXX &#58; ProxyCargo{}; //XXXXX = proxy for Cargo soldiers in your model &#40;.p3d&#41;
};
[/QUOTE]<span id='postcolor'>

just copy and past and change it for your model.
If it&#39;s doesnt work it&#39;s inside your model, for solve that look on upper posts for solution http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif

after that you have to work a little http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif

Gummi
Mar 17 2003, 10:54
i sure will give you credits if it works, thx ***http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

added: it worked great http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif thx m8

Tanelorn
Mar 17 2003, 23:26
*sigh*

cfgModels has been known and documented for months now. It&#39;s sad how few people actually do forum searches and visit the OFPEC tutorials section.

http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif