Jump to content
Sign in to follow this  
soul_assassin

Setting up a vehicle missile proxy

Recommended Posts

Here's the deal

I'm trying to set up a properly working missile launcher on the turret and here's what I have so far:

1. model at3.p3d has the flying missile model (ie with the firetrail)

2. static model at3_proxy.p3d with no fire trail. This one I also added as a proxy to the main model.

3. cfgAmmo

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

model = "\SA_BMD_PACK_1\at3\at3.p3d";

proxyShape = "\SA_BMD_PACK_1\at3\at3_proxy.p3d";

hit = 500;

indirectHit = 20;

indirectHitRange = 0.5;

cost = 10000;

maxSpeed = 200; // max speed on level road, km/h

irLock = 0;

soundHit[] = {"\ca\Weapons\Data\Sound\explosion_large1", db25, 1};

soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", db-10, 1.5};

soundEngine[] = {"\ca\Weapons\Data\Sound\noise", db-30, 1};

manualControl = 1;

maxControlRange = 1000;

trackOversteer = 1;

trackLead = 1;

initTime = 0.15;

thrustTime = 2.5;

thrust = 350;

maneuvrability = 20.0;

};

4. cfgMagazine

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

scope = public;

displayName = "AT-3 Malutka";

ammo = sa_AT3;

count = 1;

initSpeed = 0;

nameSound = "missiles";

sound[] = {"\ca\Weapons\Data\Sound\RocketLauncher_Shot04", db10, 1};

reloadSound[] = {"\ca\Weapons\Data\Sound\missload", 0.000316228, 1};

};

5. cfgWeapons

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

displayName = AT3 Maljutka;

minRange = 300;

minRangeProbab = 0.1;

midRange = 1000;

midRangeProbab = 0.7;

maxRange = 2000;

maxRangeProbab = 0.001;

sound[] = {"\ca\Weapons\Data\Sound\Javelin1", db30, 1};

soundFly[] = {"\ca\Weapons\Data\Sound\rocket_fly1", db28, 0.8};

reloadTime = 15;

magazineReloadTime = 15;

magazines[] = {"sa_AT3_1"};

aiRateOfFire = 5.0;

aiRateOfFireDistance = 500;

};

6. config.cpp

Quote[/b] ]magazines[] = {"sa_2A28_PG15V_24","sa_2A28_OG15V_16","sa_AT3_1","sa_A

T3_1","sa_AT3_1","sa_AT3_1","sa_PKT_762_2000"};

And thats it. There is no entry about it in model.cfg or nothing. On placement in the editor i get the "missing entry: Default" error (was not there before I started adding the missile).

When I fire the missile, the static proxy does not dissapear, neither does it when all rounds have been depleted. Moreover the fired missile doesnt have its own speed but the speed of the vehicle so when its stationary then the rocket just hangs there.

Ive looked and looked, can't seem to find anything. Do I have to define cfgNonAIVehicles class? What should I do?

Thnx for the help

Share this post


Link to post
Share on other sites

try adding this to start of cfgammo.

class CfgAmmo

{

class Default; // External class reference

class MissileCore; // External class reference

class MissileBase : MissileCore {};

This to cfgmagazines,

class CfgMagazines {

class Default; // External class reference

class CA_Magazine : Default {

scope = protected;

value = 1;

displayName = "";

model = "\ca\weapons\mag_univ.p3d";

picture = "";

modelSpecial = "";

useAction = false;

useActionTitle = "";

reloadAction = "ManActReloadMagazine";

ammo = "";

count = 30;

type = 256;

initSpeed = 900;

selectionFireAnim = "zasleh";

nameSound = "";

maxLeadSpeed = 600;

};

class VehicleMagazine : CA_Magazine {

type = VSoft;

reloadAction = "";

};

                           };

And this to cfgweapons,

class Mode_SemiAuto;

class Mode_Burst;

class Mode_FullAuto;

class cfgWeapons

{

class Default; // External class reference

class PistolCore; // External class reference

class RifleCore; // External class reference

class MGunCore; // External class reference

class LauncherCore; // External class reference

class GrenadeCore; // External class reference

class GrenadeLauncher; // External class reference

class CannonCore; // External class reference

class Launcher; // External class reference

class MissileLauncher : LauncherCore{};

class MGun : MGunCore {};

class Rifle : RifleCore {};

};

Do you need to add anything in the memory LOD ?

Share this post


Link to post
Share on other sites

No, don't do what RM Snipe said, that is (partially) OFP style, it's a high risk to break ArmA or other addons with it.

What you have there is looking all good so far.

What you need is<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgNonAIVehicles

{

class ProxyWeapon;

class Proxyat3_proxy: ProxyWeapon

{

model      = \SA_BMD_PACK_1\at3\at3_proxy;

simulation = "maverickweapon";

};

};

BTW: I'd never put a version number into the pbo name wink_o.gif

Share this post


Link to post
Share on other sites
No, don't do what RM Snipe said, that is (partially) OFP style, it's a high risk to break ArmA or other addons with it.

What you have there is looking all good so far.

What you need is<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgNonAIVehicles

{

class ProxyWeapon;

class Proxyat3_proxy: ProxyWeapon

{

model      = \SA_BMD_PACK_1\at3\at3_proxy;

simulation = "maverickweapon";

};

};

BTW: I'd never put a version number into the pbo name wink_o.gif

cheers phillip!

Ive tried this before but:

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

{

class ProxyWeapon;

class ProxyAt3_proxy: ProxyWeapon

{

model = \SA_BMD_PACK_1\at3\at3_proxy;

simulation = "maverickweapon";

};

};

obviously I should have used the model p3d name.

Regarding the number in the pbo name. its not the version, more like designation. Pack 1 will have some content while pack 2 other and so on.

Share this post


Link to post
Share on other sites

hmm I gave it a go and unfortunately I still have problems.

no I get the errors:

"No entry bin\config.bin/CfgVehicles/CfgNonAIVehicles.scope"

also

all of a sudden

"missing model.cfg/cfgModels.Default"

The "non-dissapearance" problem persists. Please someone help ! banghead.gif

Share this post


Link to post
Share on other sites

try this instead

Quote[/b] ]

class strategic;

class CfgNonAIVehicles: strategic

{

class ProxyWeapon;

class Proxyat3_proxy: ProxyWeapon

{

model      = \SA_BMD_PACK_1\at3\at3_proxy;

simulation = "maverickweapon";

};

};

next thing is to get the ammo itself functional aka moving, take out the proxy model path and see what happens, missile should fly then if i didnt missed something in the configs.

next step is to add memorypoints for the missilepos and missilefiring pos to model and config. and keep the setobjecttexture command in mind, just in case proxies dont work with tracked vehicles.

Share this post


Link to post
Share on other sites
try this instead
Quote[/b] ]

class strategic;

class CfgNonAIVehicles: strategic

{

class ProxyWeapon;

class Proxyat3_proxy: ProxyWeapon

{

model      = \SA_BMD_PACK_1\at3\at3_proxy;

simulation = "maverickweapon";

};

};

next thing is to get the ammo itself functional aka moving, take out the proxy model path and see what happens, missile should fly then if i didnt missed something in the configs.

next step is to add memorypoints for the missilepos and missilefiring pos to model and config.  and keep the setobjecttexture command in mind, just in case proxies dont work with tracked vehicles.

proxymodel path form cfgammo?

the missile pos memory points have to be defined in the turret config?

EDIT:

did the proxyfix and that solved that error smile_o.gif Put in the Konec Rakety and Spice Rakety in memory lod, that fixed the point and angle of the launch (so its not out of the gun anymore) didnt have to define it in config.

the model.cfg error still persists as do the "hanging in the air rocket" launches and has 0 velocity. I have tried changing the initSpeed value but in other vehicles its set to 0. and the "non-dissapearing rocket on turret". Im just baffled

Share this post


Link to post
Share on other sites

memoryPointMissile[] = {"usti hlavne"};

memoryPointMissileDir[]= {"konec hlavne"};

if your memorypoints use different naming you have to use those names of course.

cfgammo:

// proxyShape = \SA_BMD_PACK_1\at3_proxy;

regards

Share this post


Link to post
Share on other sites

class CfgSkeletons

{

class Default;

class Tank;

and so on..

but i doubt that it has anything to do with the missileproblem

maybe try with irlock=true

Share this post


Link to post
Share on other sites

well after tearing out a bit more hairs i fixt everything up except the dissapearing part and judging by the fact that Scars' SA6 also uses setobjecttexture it seems i have no choice.

Thnx to everyone for their help smile_o.gif!

Share this post


Link to post
Share on other sites

upon further inspections I take my words back. The SA6 does not use setobjecttotexture. SO im back at the drawing board.

Share this post


Link to post
Share on other sites

must be a different sa6 that i looked into, the one i have use setobjecttexture, no proxy. maybe a older version.

Share this post


Link to post
Share on other sites

I still have some hope that maybe raedor with his infinite wisdome can give me some insight. I really didnt expect to run in to trouble with this mad_o.gif

Share this post


Link to post
Share on other sites

I would add "CAWEAPONS" to the requiredAddon section in CfgPatches so you can be sure the classes you inherit from are available. Furthermore I would check the rpt for some hints. There is definately no limitation for tracked vehicles, because the cwr bmp (by CSLA) works properly without using setObjectTexture workaround.

Share this post


Link to post
Share on other sites

bah, im totally lost. Need to start from scratch I guess. Gonna ask more advice form Maa when I get the chance. None of these solutions helped (even though looking through the .rpt file yielded some config errors). Man I wish some BIS person showed up and gave a step by step guide of how to make a tracked vehicle with proxy fire.

Share this post


Link to post
Share on other sites

Did you already have checked MechaStalin's BMD-1? I cannot remember exactly, but I think that the proxies were OK in this vehicle (but I am not 100% sure).

Alternatively, the SCUD-Launcher may be worth to check for this issue, but I have no link to this addon at the moment.

Share this post


Link to post
Share on other sites

Bad news  huh.gif

I have set up a T-72 and added AH-1Z's missile proxy plus according weapon for commander turret. The proxy does not pop up.

I created a countertest, using a M113. The proxy performs correct, so I guess this behavior is connected to multiple turrets.

Also I am unable to detect, where a proxy gets connected to a weapon. The AH-1Z proxy is named AGM114Hellfire, which pops up only in the CfgNonAIVehicles section of the air.pbo.

The according proxy in the hellfire's wepon.pbo is named Hellfire_proxy  crazy_o.gif

I expect that missle proxy's can be used in multiple turret vehicles, when we are able to assign the correct model proxy to the weapon.

DL-link of my testcase: zShare DL-link smurfc_t72_stinger

(I named it stinger, because I intended to use stingers... but hellfires match your case better)

BR,

mike

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  

×