Jump to content
Sign in to follow this  
Messiah

Static Weapon Config

Recommended Posts

i've been searching tutorials etc, but none of them deal with static MG's, or transportable ones for that matter, but first things first - does anyone have a basic M2 + Tripod config or know where i can get one?

cheers

Share this post


Link to post
Share on other sites

nevermind, Deadmeat sent me one over msn - although may need help later knowing me tounge_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class M2StaticMG: M113

{ // TODO: derive from Fortress

//--

hideProxyInCombat = false;

/*!

\patch 1.30 Date 11/02/2001 by Viktor

- Fixed: Appropriate picture for M2.

*/

picture=m2;

/*!

\patch 1.30 Date 11/02/2001 by Viktor

- Fixed: Soldier instead of tank crew.

*/

crew = SoldierWB;

hasDriver = false; // no driver - static

hasGunner = true; // only one person inside

hasCommander = false;

castGunnerShadow = true;

ejectDeadGunner = false;

unitInfoType=UnitInfoSoldier;

hideUnitInfo=true;

irScanRangeMin = 0;

irScanRangeMax = 0;

irTarget = false;

maxSpeed = 1; // not able to move

fuelCapacity = 0;

transportSolider = 0;

gunnerAction = ManActM2Gunner;

gunnerInAction = ManActM2Gunner;

gunnerCanSee = CanSeeEye+CanSeeEar;

commanderCanSee = CanSeeEye+CanSeeEar;

extCameraPosition[]={0,0.8,-5};

class TransportMagazines {};

cost=10000;

//getInAction = ManActStop;

getInAction = ManActGetInCar;

getOutAction = ManActGetOutCar;

class Turret: TurretBase

{

soundServo[]={};

minElev=-5;

maxElev=+5;

minTurn=-45;

maxTurn=+45;

};

armor=30;

armorStructural=10.0;

type = VSoft;

model=UKF_TripodWeap.p3d;

icon = kulomet.paa;

vehicleclass="UKF Heavy Weapons"

displayName="GPMG Sustained Fire";

nameSound="mgun";

transportSoldier = 0;

transportAmmo = 0;

accuracy=0.30;

typicalCargo[]={};

transportMaxMagazines = 0;

transportMaxWeapons = 0;

};

ok, heres a config i modified to suit... but the damn thing doesnt appear ingame - is there anything i've missed out?

Share this post


Link to post
Share on other sites

ok, its been modified too change the first line to:

class UKF_GPMGSF: UKF_SF

still not working tho

Share this post


Link to post
Share on other sites

maybe a config with less stuff in it will work

try this one,just add and adjust the important stuff

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><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 APC: Tank{};

class M113:APC{};

class M2StaticMG: M113{};

class OYMAN_M2: M2StaticMG

{

model="\OYMAN_M2\OYMAN_M2";

displayName="OYMAN_M2";

weapons[]={"oymanM2B"};

magazines[]={"oymanM2B","oymanM2B"};

};

};

Share this post


Link to post
Share on other sites
Quote[/b] ]model=UKF_TripodWeap.p3d;

here you would normally have the path for the model

ie: model="\folder name\UKF_TripodWeap.p3d";

and you can also leave off the '.p3d'

model="\folder name\UKF_TripodWeap";

Share this post


Link to post
Share on other sites

nothing... stil wont appear ingame at all...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><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 APC: Tank{};

class M113:APC{};

class M2StaticMG: M113{};

class UKF_SF: M2StaticMG

{

model="\UKF_SF\UKF_TripodWeap";

displayName="GPMG Sustained Fire";

weapons[]={};

magazines[]={};

};

};

nowt

Share this post


Link to post
Share on other sites

Without seeing the whole cfg I am not real sure but you could add these

picture="\UKF_SF\yourpic.paa"

side="number"

A rifle I made would not show until I added the picture=""

Share this post


Link to post
Share on other sites

that is the whole config - as for the picture, i dont have one to use at the moment - what would i use as the BIS one for now?

Share this post


Link to post
Share on other sites

picture=m2;

try that and sorry I meant the cpp not cfg

Share this post


Link to post
Share on other sites
that is the whole config - as for the picture, i dont have one to use at the moment - what would i use as the BIS one for now?

If that's the whole config.cpp, you'll need to add a

CfgPatches at the top as well:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

    class PUKF

    {

         units[] = {UKF_SF};

         weapons[] = {};

         requiredVersion = 1.85;

    };

};

Share this post


Link to post
Share on other sites
that is the whole config

i thought you had everything else in the config crazy_o.gif well as footmunch said you also need a Cfg patches

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgModels

{

class Default {};

class Vehicle: Default {};

class Tank: Vehicle {};

class UKF_SF: Tank {};

};

class CfgPatches

{

class UKF_SF

{

units[]={};

weapons[]={};

requiredVersion=1.85;

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land: AllVehicles{};

class LandVehicle: Land{};

class Tank: LandVehicle{};

class APC: Tank{};

class M113:APC{};

class M2StaticMG: M113{};

class UKF_SF: M2StaticMG

{

model="\UKF_SF\UKF_TripodWeap";

displayName="GPMG Sustained Fire";

weapons[]={};

magazines[]={};

};

};

Share this post


Link to post
Share on other sites

Oyman - Noooooooooooooooooooooooooooooooo.  tounge_o.gif

The new class in CfgModels is the _p3d_ file name, _not_ the

addon name. So:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgModels

{

class Default {};

class Vehicle: Default {};

class Tank: Vehicle {};

class UKF_TripodWeap: Tank {};

};

Instead. Also, the addon name should be listed in the units

array in CfgPatches. The patch name itself (PUKF in my post

above) doesn't do anything, IIRC.

So, the _full_ cpp will look like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

   class PUKF

   {

        units[] = {UKF_SF};

        weapons[] = {};

        requiredVersion = 1.85;

   };

};

class CfgModels

{

   class default{};

   class vehicle:default{};

   class tank:vehicle{};

   class UKF_TripodWeap: tank{};

};

class CfgVehicles

{

    class All{};

    class AllVehicles:All{};

    class Land: AllVehicles{};

    class LandVehicle: Land{};

    class Tank: LandVehicle{};  

    class APC: Tank{};

    class M113:APC{};

    class M2StaticMG: M113{};

    class UKF_SF: M2StaticMG

    {

          model="\UKF_SF\UKF_TripodWeap";

          displayName="GPMG Sustained Fire";

          weapons[]={};

          magazines[]={};

    };

};

Share this post


Link to post
Share on other sites

brilliant guys  smile_o.gif

this is what it looks like now (although i had got it ingame, since it wasnt an M2 as such, the gunner was invisible)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">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

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class PUKF

{

units[] = {UKF_SF};

weapons[] = {};

requiredVersion = 1.85;

};

};

class CfgModels

{

class default{};

class vehicle:default{};

class tank:vehicle{};

class UKF_TripodWeap: tank{};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land: AllVehicles{};

class LandVehicle: Land{};

class Tank: LandVehicle{};

class APC: Tank{};

class M113:APC{};

class M2StaticMG: M113{};

class UKF_SF: M2StaticMG

{

//--

scope=public;

crew = SoldierWCrew;

picture=im113;

side=TWest;

vehicleclass="UKF Heavy Weapons";

displayName="GPMG Sustained Fire HM";

accuracy=0.30;

armor=30;

cost=100000;

maxSpeed=0;

hasDriver = false

hasCommander=false;

hasGunner = true;

castGunnerShadow = true;

ejectDeadGunner = false;

transportSoldier = 0;

irScanRangeMin = 0;

irScanRangeMax = 0;

DefaultWestMagazines= 0;

transportAmmo = 0;

gunnerAction="ManActM113gunner";

gunnerInAction="ManActM113gunner";

model="\UKF_SF\UKF_TripodWeap.p3d";

class TurretBase

{

minElev=-5;

maxElev=+5;

minTurn=-10;

maxTurn=+10;

};

//gunnerOpticsModel = "optika_m2mg";

gunnerOpticsModel = "optika_empty";

weapons[]={Browning};

magazines[]={Browning};

type=VArmor;

//threat[] VSoft, VArmor, VAir

threat[]={0.9, 0.2, 0.1};

typicalCargo[]={};

transportMaxMagazines = 0;

transportMaxWeapons = 0;

};

};

Share this post


Link to post
Share on other sites

having a few more problems - i cant seem to see the gunner... even if i raise the thing 10m in the air, he is nowhere to be seen (just in case the proxie was out of line)... im a little unsure as to what to do

Share this post


Link to post
Share on other sites

In O2 how have you named the Gunner's proxy?

proxy:M113Gunner.01

Share this post


Link to post
Share on other sites

i used the 5Tcodriver.p3d one, as its lower to the ground and its just a fill in till i get our animator on the job

Share this post


Link to post
Share on other sites

Then in the cpp change the gunnerAction="ManActM113gunner"; to

gunnerAction="ManAct5Tcodriver.";

Share this post


Link to post
Share on other sites

thought that may be the problem looking through my config tounge_o.gif

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  

×