-
Content Count
348 -
Joined
-
Last visited
-
Medals
Posts posted by PicVert
-
-
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 : Default{};
class Car : Vehicle{};
class jeep_mg : Car{};
class VH_XXXXXXX : jeep_mg{}; //model name (without ".p3d") **must be the same of your pbo too**
};
class CfgPatches
{
class VH_XXXXXXX //name of your model and your ".pbo"
{
units[] = {VH_XXXXXXX}; //name of class cfgvehicles for yours and for the model and ".pbo"
weapons[] = {MG_XXXX}; //name of class weapons for yours
requiredVersion = 1.75;
requiredAddons[] = {BIS_Resistance};
};
};
class CfgWeapons
{
class Default{};
class MGun : Default
class MachineGun7_6 : MGun{};
class MachineGun12_7 : MachineGun7_6{};
class Browning : MachineGun12_7{};
class MG_XXXX : Browning //weapons name (and magazine if you dont make an other one)
{
ammo="Bullet12_7";
sound[]={"Weapons\m2-50-loop",31.622778,1};
};
};
class cfgvehicles
{
class JeepMG : Jeep
class XXXXXX : JeepMG
{
displayName="XXXXXXXXX"; //name of vehicle in game
model="VH_XXXXXXX.p3d"; //name of your model
picture="XXXXXXX.paa"; //picture of your vehicle in game
gunnerAction="ManActJeepGunner";
hasGunner=1;
castGunnerShadow=1;
ejectDeadGunner=1;
castDriverShadow=1;
driverIsCommander=1;
scope=2;
weapons[]={"MG_XXXX"}; //name of class weapon used like : MG_XXXX
magazines[]={"MG_XXXXmag"}; //name of class weapon magazine used like : MG_XXXXmag
gunnerOpticsModel="optika_empty";
unitInfoType=unitinfosoldier;
transportSoldier=1;
class Turret
{
gunAxis="OsaHlavne";
turretAxis="OsaVeze";
soundServo[]={};
gunBeg="usti hlavne";
gunEnd="konec hlavne";
minElev=-5;
maxElev=40;
minTurn=-360;
maxTurn=360;
body="OtocVez";
gun="OtocHlaven";
};
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 : WeaponCloudsMGun
{
};
};
class CfgNonAIVehicles
{
class ProxyCrew{};
class ProxyDriver : ProxyCrew{};
class ProxyGunner : ProxyCrew{};
class ProxyCargo : ProxyCrew{};
class ProxyXXXXX : ProxyDriver{}; //XXXXX = proxy for driver in your model (.p3d)
class ProxyXXXXX : ProxyGunner{}; //XXXXX = proxy for gunner in your model (.p3d)
class ProxyXXXXX : ProxyCargo{}; //XXXXX = proxy for Co-driver soldier in your model (.p3d)
class ProxyXXXXX : ProxyCargo{}; //XXXXX = proxy for Cargo soldiers in your model (.p3d)
};
<span id='postcolor'>
just copy and past and change it for your model.
If it's doesnt work it's inside your model, for solve that look on upper posts for solution

after that you have to work a little

-
HEEEEELLLLLLLLPPPPPPP




-
4--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Gummi @ Mar. 16 2003,02
4)</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 ?<span id='postcolor'>Ok it'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...
 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[]={};
sectionsInherit="";
};
class Vehicle : Default
{
sections[]={"cislo","grupa","side","sektor","clan","podsvit pristroju","poskozeni","L svetlo","P svetlo","zasleh"};
};
class Car : Vehicle
{
sectionsInherit="Vehicle";
sections[]={"ammo","sklo predni p","sklo predni l","zadni svetlo","brzdove svetlo"};
};
class jeep_mg : Car
{
};
};
<span id='postcolor'>
Now you have all that you want.
The weapon is not defined on cfgmodels... Like a Tank or Plane.

I hope you give me a credit for your car

tell me when you've finished your work.
-
it'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 : Jeep
{
displayName="$STR_DN_JEEP_MG";
model="Jeep_mg.p3d";
picture="ijeepmg.paa";
gunnerAction="ManActJeepGunner";
hasGunner=1;
castGunnerShadow=1;
ejectDeadGunner=1;
castDriverShadow=1;
driverIsCommander=1;
scope=2;
weapons[]={"Browning"};
magazines[]={"Browning"};
gunnerOpticsModel="optika_empty";
unitInfoType=unitinfosoldier;
transportSoldier=1;
class Turret
{
gunAxis="OsaHlavne";
turretAxis="OsaVeze";
soundServo[]={};
gunBeg="usti hlavne";
gunEnd="konec hlavne";
minElev=-5;
maxElev=40;
minTurn=-360;
maxTurn=360;
body="OtocVez";
gun="OtocHlaven";
};
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 : WeaponCloudsMGun
{
};
};
<span id='postcolor'>
-
it'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 : Jeep
{
displayName="$STR_DN_JEEP_MG";
model="Jeep_mg.p3d";
picture="ijeepmg.paa";
gunnerAction="ManActJeepGunner";
hasGunner=1;
castGunnerShadow=1;
ejectDeadGunner=1;
castDriverShadow=1;
driverIsCommander=1;
scope=2;
weapons[]={"Browning"};
magazines[]={"Browning"};
gunnerOpticsModel="optika_empty";
unitInfoType=unitinfosoldier;
transportSoldier=1;
class Turret
{
gunAxis="OsaHlavne";
turretAxis="OsaVeze";
soundServo[]={};
gunBeg="usti hlavne";
gunEnd="konec hlavne";
minElev=-5;
maxElev=40;
minTurn=-360;
maxTurn=360;
body="OtocVez";
gun="OtocHlaven";
};
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 : WeaponCloudsMGun
{
};
};
<span id='postcolor'>
-
</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't think that's the problem or he would have complained about the muzzle flash being visible on the gun itself.<span id='postcolor'>
I assume your right, it's inside the model...
You have put your flash inside le Lod of your shadow ...
It's a limitation of OFP you can't have shadow for muzzle flash.
look in original M16 you don'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'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: Default{};
class Your_model0 : Weapon{};
class Your_model1 : Weapon{};
class Your_model2 : Weapon{};
class Your_model3 : Weapon{};
};
<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).
-
</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't think that's the problem or he would have complained about the muzzle flash being visible on the gun itself.<span id='postcolor'>
I assume your right, it's inside the model...
You have put your flash inside le Lod of your shadow ...
It's a limitation of OFP you can't have shadow for muzzle flash.
look in original M16 you don'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'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: Default{};
class Your_model0 : Weapon{};
class Your_model1 : Weapon{};
class Your_model2 : Weapon{};
class Your_model3 : Weapon{};
};
<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).
-
thx, Incomming missile work fine but I have that message for GETOUT when pilot is using eject :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">
'if ((getpos ((_tis select 0) select 2)) select2)) >=¦#¦ 20) the {(_this select 2) say "Ejection"}': Error select: Type Object, expected Array<span id='postcolor'>
and for HIT nothing wrong but no sound

-
I would make an event when my plane detect and Incomingmissile and an other for getdammage (I think is hit ?) and an other one for "if getdammage .7 then eject"
some one could help me to make the apropriate Eventhandlers...That is what I've made but it does'nt work Â
 
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgRadio
{
class danger
{
 sound[]={\XXXXX\danger.wav,db5,1};
 name = "danger";
 title =;
};
};
class CfgSounds
{
class Ejection
{
name="Ejection";
sound[]={"\XXXXX\Ejection.wav",1.00000,1.000000};
titles[]={};
};
class warn
{
name="warn";
sound[]={"\XXXXX\warn.wav",1.00000,1.000000};
titles[]={};
};
};
   class EventHandlers
   {
gear = "if (_this Select 1) then {(_this Select 0) Animate [""LeftGear"", 0]; (_this Select 0) Animate [""RightGear"", 0]; (_this Select 0) Animate [""NoseGear"", 0]} else {(_this Select 0) Animate [""LeftGear"", 1]; (_this Select 0) Animate [""RightGear"", 1]; (_this Select 0) Animate [""NoseGear"", 1]}";
IncomingMissile = "(_this select 0) say ""warn""";
Hit = "if (GetDammage (_this select 0) > 0.5 ) then {(_this select 0) vehicleRadio ""danger""})";
getout = "if ( getpos (_this select 0) select 2 > 20 then {(_this select 2) say ""Ejection""})";
   };
<span id='postcolor'>
an idea 
-
ok thx Gen. Carnage.
-
It's config.cpp mistake you have to define CfgModel inside it.
-
It's config.cpp mistake you have to define CfgModel inside it.
-
-
hey it's me again...
Could I make in ViewPilot lod of a plane the spinning radar with selection </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">ukaz_radar<span id='postcolor'>
I have defined selection inerit like that :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {
sectionsInherit="Vehicle";
sections[]={vrtule staticka","vrtule blur"};
};<span id='postcolor'>
how can I put the ukaz_radar work ? could you help me again ?
-
Thx Gen. Carnage.
I would try that in other tank
I ave some outsided view in that lod.thx.

-
pfffff nobody has an idea
come on.. -
It's an other way to do that with your CPP try that line in CfgVehicle of your model :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Land: AllVehicles {};
class LandVehicle: Land {};
class Tank: LandVehicle {};
class M1Abrams: Tank {};
class XXXXXXXX: M1Abrams
{
XXXXXXXXXXXXXXXXXXXX
XXXX (your define)XXXXXX
XXXXXXXXXXXXXXXXXXXX
class Explosion
{
access=3;
cloudletDuration=0.200000;
cloudletAnimPeriod=0.800000;
cloudletSize=1.000000;
cloudletAlpha=1.000000;
cloudletGrowUp=0.050000;
cloudletFadeIn=0.010000;
cloudletFadeOut=0.020000;
cloudletAccY=-0.200000;
cloudletMinYSpeed=0;
cloudletMaxYSpeed=3;
cloudletShape="cl_fired";
cloudletColor[]={1,1,1,0};
interval=0.001000;
size=15.000000;
sourceSize=3.000000;
timeToLive=0;
initT=2500;
deltaT=-4000;
};
class WeaponCloudsGun
{
access=3;
cloudletDuration=0.020000;
cloudletAnimPeriod=1.000000;
cloudletSize=0.050000;
cloudletAlpha=1.000000;
cloudletGrowUp=1;
cloudletFadeIn=0.008000;
cloudletFadeOut=1;
cloudletAccY=0.200000;
cloudletMinYSpeed=0.200000;
cloudletMaxYSpeed=0.600000;
cloudletShape="cl_basic";
cloudletColor[]={1,1,1,0};
interval=0.050000;
size=15.05;
sourceSize=0.500000;
timeToLive=0;
initT=0;
deltaT=0;
class Table
{
class T0
{
maxT=0;
color[]={1,1,1,0};
};
};
};
class WeaponCloudsMGun {};
class WeaponFireMGun {};
class WeaponFireGun
{
access=3;
cloudletDuration=4.200000;
cloudletAnimPeriod=1.000000;
cloudletSize=13.000000;
cloudletAlpha=1.000000;
cloudletGrowUp=0.200000;
cloudletFadeIn=4.010000;
cloudletFadeOut=4.500000;
cloudletAccY=0;
cloudletMinYSpeed=-100;
cloudletMaxYSpeed=100;
cloudletShape="cl_fired";
cloudletColor[]={1,1,1,0};
interval=0.010000;
size=15;
sourceSize=0.500000;
timeToLive=0;
initT=4500;
deltaT=-3000;
};
class GunFire: WeaponFireGun
{
class Table
{
class T0
{
maxT=0;
color[]={0.820000,0.950000,0.930000,0};
};
class T1
{
maxT=200;
color[]={0.750000,0.770000,0.900000,0};
};
class T2
{
maxT=400;
color[]={0.560000,0.620000,0.670000,0};
};
class T3
{
maxT=600;
color[]={0.390000,0.460000,0.470000,0};
};
class T4
{
maxT=800;
color[]={0.240000,0.310000,0.310000,0};
};
class T5
{
maxT=1000;
color[]={0.230000,0.310000,0.290000,0};
};
class T6
{
maxT=1500;
color[]={0.210000,0.290000,0.270000,0};
};
class T7
{
maxT=2000;
color[]={0.190000,0.230000,0.210000,0};
};
class T8
{
maxT=2300;
color[]={0.220000,0.190000,0.100000,0};
};
class T9
{
maxT=2500;
color[]={0.350000,0.200000,0.020000,0};
};
class T10
{
maxT=2600;
color[]={0.620000,0.290000,0.030000,0};
};
class T11
{
maxT=2650;
color[]={0.590000,0.350000,0.050000,0};
};
class T12
{
maxT=2700;
color[]={0.750000,0.370000,0.030000,0};
};
class T13
{
maxT=2750;
color[]={0.880000,0.340000,0.030000,0};
};
class T14
{
maxT=2800;
color[]={0.910000,0.500000,0.170000,0};
};
class T15
{
maxT=2850;
color[]={1,0.600000,0.200000,0};
};
class T16
{
maxT=2900;
color[]={1,0.710000,0.300000,0};
};
class T17
{
maxT=2950;
color[]={0.980000,0.830000,0.410000,0};
};
class T18
{
maxT=3000;
color[]={0.980000,0.910000,0.540000,0};
};
class T19
{
maxT=3100;
color[]={0.980000,0.990000,0.600000,0};
};
class T20
{
maxT=3300;
color[]={0.960000,0.990000,0.720000,0};
};
class T21
{
maxT=3600;
color[]={1,0.980000,0.910000,0};
};
class T22
{
maxT=4200;
color[]={1,1,1,0};
};
};
};
class GunClouds: WeaponCloudsGun{};
class MGunFire: WeaponFireMGun{};
class MGunClouds: WeaponCloudsMGun
{
cloudletAnimPeriod=1.000000;
cloudletSize=1.000000;
cloudletShape="cl_basic";
cloudletColor[]={1,1,1,0};
cloudletGrowUp=0.050000;
cloudletFadeIn=0;
cloudletFadeOut=0.100000;
cloudletDuration=0.050000;
cloudletAlpha=0.300000;
cloudletAccY=0;
cloudletMinYSpeed=-100;
cloudletMaxYSpeed=100;
interval=0.020000;
size=0.300000;
sourceSize=0.020000;
timeToLive=0;
initT=0;
deltaT=0;
class Table
{
class T0
{
maxT=0;
color[]={1,1,1,0};
};
};
};
};
};
<span id='postcolor'>
You have a good explosion and fire gun clouds !!
Regards
PicVert
-
I tested to make osa_time and other one in my turret (tank) and the only one working is osa_rychlo.??
when I turn the turret left or right the selection move with the body of the tank and don't turn with the turret ??
I have the selection OtocVez right placed with all parts and named selections for part did use the rotation right too.
Some know about that, did I make a special config in cpp for solve that ??
Thx for all reaply

-
-
in the cpp make a new line in cfgvehicles :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
transportSoldier=1;
<span id='postcolor'>
this is for making one place more than the usual capacity of the vehicle.
But you have to load the soldier in mission it is not loaded by defaut.
Otherwise you have to make a new proxy inside the model.
-
I found other stuff about cockpit and driver view, is the highlight in night of the view.
You must make an other texture (the same of the initial view) and make a plane just in front of the other one and press "shift + e" make texture to shining, make a new named selection : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">podsvit pristroju<span id='postcolor'>
Then when you make engin on in game the highlighted texture is on too.

-
In O2 one square is one meter (European measurement)
-
Hey,
I would make that post for find a help with driver and pilot views.
Altimeter and other stuff named selection and axis.
Ho just question what is the axis and selection for land vehicles compass ?
That is what I found, plz complete if I have forget or mistake... :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
Axis Named Selection description
osa_rpm ukaz_rpm R/min (two points axis)
osa_rychlo ukaz_rychlo Km/h (two points axis)
osa_rychlo2 ukaz_rychlo2 Km/h (second one;two points axis)
osa_t1 ukaz_t1 Temp. (not tested;two points axis)
osa_t2 ukaz_t2 Temp. (not tested;two points axis)
osa_time hodinova/minutova Watch (hour/minute;two points axis)
<span id='postcolor'>
That was for Land vehicle I think it's possible to make multiples by adding 2/3/4 .... now for air units :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
Axis Named Selection description
osa_horizont horizont the same; one point
osa_horizont2 horizont2 the same; one point
osa_time hodinova/minutova Watch (hour/minute;two point axis)
osa_mph mph Km/h; two points
osa_alt alt Altimeter; two points
osa_nm_alt nm_alt Altimeter from sea; two points
<span id='postcolor'>

-
It's right Kegetys but you have forget to tell that not possible to see through a *.pac textured side..



New question about eventhandlers
in OFP : CONFIGS & SCRIPTING
Posted
hello Rastavovish
that is my events but it does'nt work
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class EventHandlers
{
IncomingMissile = "(_this select 0) say ""warn""";
hit = "if ((GetDammage (_this select 0)) >= .1 ) then {(_this select 0) vehicleRadio ""danger""}";
getout = "if ((getpos ((_this select 0) select 2)) >= 20) then {(_this select 2) say ""Ejection""}";
}
<span id='postcolor'>
for hit I hurd no sound
and for getout the message is like I wrote before
not exactly
I mine select 2 is the pilot when is ejected maybe that is what I have read in other post.
some one can correct my code. plz.