Jump to content
Sign in to follow this  
Rob

Making an addon

Recommended Posts

I'm not sure but it looks like you have one }; too many after the CfgWeapons class, try taking one of them off.

Share this post


Link to post
Share on other sites

aaaahhhh it wants me to input something at the end of the file... but WOT??

Share this post


Link to post
Share on other sites

D you need a semi-colon after the line below?

picture="\dtaext\equip\w\w_at4launcher.paa"

I haven't done any OFP scripting but as a C++/Java developer that line looks wrong.

Share this post


Link to post
Share on other sites

I think you need. I'm trying to get this thing to work, but I've only been able to get a new error: 'r' encountered instead of '{'.

Share this post


Link to post
Share on other sites

Also, as of the source you posted, you appear to have two spare right braces after the FullAuto class.

I'm still checking the rest BTW

Share this post


Link to post
Share on other sites

Plus 2 spare after CfgVehicles and 1 after CfgNonAIVehicles...if the syntax obeys normal rules then that should certainly be closer to correct.

Share this post


Link to post
Share on other sites

can u plz then copy the thing out and post it so i can copy it..... all help appreciated.

Share this post


Link to post
Share on other sites

There's oly one after the FullAuto class, because the next one "closes" the CfgWeapons class.

Share this post


Link to post
Share on other sites

like i said can u plz copy it and let me copy it becuz im getting confused with both of u saying do this do that, no do that do this...

Share this post


Link to post
Share on other sites

cool.. hurry hurry hurry

Share this post


Link to post
Share on other sites

I don't think that I can get this thing to work after all and I seriously doubt it that rocket launchers can be given multiple fire modes in OFP. I can post the config.cpp and see if someone else can get this to work.

Share this post


Link to post
Share on other sites

well the automatic launcher was just a thought...

go ahead and post it anyway. if not then i will just use the original.

Share this post


Link to post
Share on other sites

// 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

#define WeaponNoSlot0// dummy weapons

#define WeaponSlotPrimary1// primary weapons

#define WeaponSlotSecondary16// secondary weapons

#define WeaponSlotItem256// items

#define WeaponSlotBinocular4096// binocular

#define WeaponHardMounted65536

class CfgPatches

{

class RPG90soldier

{

units[] = {RPG90soldier};

weapons[] = {};

requiredVersion = 1.30;

};

};

class CfgAmmo

{

class default {};

class LAW : Default {};

class RPG : LAW {};

class RPG90ammo : RPG

{

hit=3000;

indirectHit=1000;

indirectHitRange=7;

picture="\dtaext\equip\w\w_at4launcher.paa";

};

};

class CfgWeapons

{

class default {};

class LAWLauncher : default {};

class CarlGustavLauncher : LAWLauncher {};

class AT4Launcher : CarlGustavLauncher {};

class RPG90launcher : AT4Launcher

{

displayName = "RPG90";

displayNameMagazine = "RPG90";

shortNameMagazine = "RPG90";

initspeed=80;

count = 3;

maxLeadSpeed=200;

scopeWeapon = public;

scopeMagazine = public;

picture="\dtaext\equip\w\w_at4launcher.paa";

optics = true;

magazines[]={"RPG90launcher"};

opticsZoomMin=0.35; //was 0.21

opticsZoomMax=0.35;

modes[]={"Single","FullAuto"};

class Single

{

displayName="RPG90";

ammo = "RPG90ammo";

count = 3;

multiplier=1;

burst=1;

modelOptics="optika_Lawlauncher";

dispersion=0.005;

soundContinuous=0;

reloadTime=0.7;

ffCount=1;

recoil="sniperSingle";

recoilFixed=riffleAutoFixed;

autoFire = 0;

aiRateOfFire=0.1; // delay between shots at given distance

aiRateOfFireDistance=500; // at shorter distance delay goes lineary to zero

sound[]={"Weapons\at_launch",0.010000,1};

useAction = 0;

useActionTitle = "";

};

class FullAuto

{

ammo = "RPG90ammo";

displayName = "RPG90 Full Auto";

count = 3;

multiplier=1;

burst=1;

dispersion=0.020;

sound[]={"Weapons\at_launch",0.010000,1};

soundContinuous=0;

reloadTime=0.09;

ffCount=1;

recoil=sniperSingle;

recoilFixed=riffleAutoFixed;

autoFire = true;

aiRateOfFire=0.1; // delay between shots at given distance

aiRateOfFireDistance=500; // at shorter distance delay goes lineary to zero

useAction = false;

useActionTitle = "";

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier: Man{};

class SoldierWB: Soldier{};

class SoldierWLAW: SoldierWB{};

class SoldierWAT: SoldierWLAW{};

class RPG90soldier: SoldierWAT

{

displayName="RPG90 soldier";

weapons[]={M16,RPG90launcher,"Throw","Put"};

magazines[]={RPG90ammo, RPG90ammo, RPG90ammo,M16, M16, M16 };

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyRPG90: ProxyWeapon {};

};

Here it is...the soldier doesn't work though, and when you add the weapon to a soldier, you see two empty weapons named RPG90 in the action menu (?).

Share this post


Link to post
Share on other sites

well then if i wanted to simply use the launcher without the single and double then would i only have to remove these parts and they would work?

o and btw maybe the reason y u didn't see anything was cuz u dont have my paa file or my p3d.

Share this post


Link to post
Share on other sites

I removed the model part from the .cpp file. If you remove the full auto and single things and tweak it a bit, it will work.

Share this post


Link to post
Share on other sites

so if i just used

<span style='color:red'>class CfgWeapons

{

class default {};

class LAWLauncher : default {};

class CarlGustavLauncher : LAWLauncher {};

class AT4Launcher : CarlGustavLauncher {};

class RPG90launcher : AT4Launcher

{

displayName = "RPG90";

displayNameMagazine = "RPG90";

shortNameMagazine = "RPG90";

initspeed=80;

count = 3;

maxLeadSpeed=200;

scopeWeapon = public;

scopeMagazine = public;

picture="\dtaext\equip\w\w_at4launcher.paa";

optics = true;

magazines[]={"RPG90launcher"};

opticsZoomMin=0.35; //was 0.21

opticsZoomMax=0.35;

};

};</span>

it should work?

Share this post


Link to post
Share on other sites

It won't work with just that. I'll post a new config.cpp later without the single and full auto.

Share this post


Link to post
Share on other sites

Here it is:

// 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

#define WeaponNoSlot0// dummy weapons

#define WeaponSlotPrimary1// primary weapons

#define WeaponSlotSecondary16// secondary weapons

#define WeaponSlotItem256// items

#define WeaponSlotBinocular4096// binocular

#define WeaponHardMounted65536

class CfgPatches

{

class RPG90soldier

{

units[] = {RPG90soldier};

weapons[] = {};

requiredVersion = 1.30;

};

};

class CfgVehicles

{

class All{};

class AllVehicles:All{};

class Land:AllVehicles{};

class Man:Land{};

class Soldier:Man{};

class SoldierWB:Soldier{};

class SoldierWLAW:SoldierWB{};

class SoldierWAT:SoldierWLAW{};

class RPG90soldier:SoldierWAT{

displayName="RPG90 Soldier";

weapons[]={RPG90Launcher,M16};

magazines[]={RPG90Launcher,M16,M16,M16};

};

};

class CfgAmmo

{

class default {};

class AT3: Default {};

class LAW: AT3 {};

class RPG : LAW {};

class RPG90ammo : RPG

{

hit=3000;

indirectHit=1000;

indirectHitRange=7;

picture="\dtaext\equip\w\w_at4launcher.paa";

};

};

class CfgWeapons

{

class default {};

class LAWLauncher : default {};

class CarlGustavLauncher : LAWLauncher {};

class AT4Launcher : CarlGustavLauncher {};

class RPG90launcher : AT4Launcher

{

displayName = RPG90;

displayNameMagazine = RPG90;

shortNameMagazine = RPG90;

modelOptics="optika_LAW";

scopeWeapon = public;

scopeMagazine = public;

picture="\dtaext\equip\w\w_at4launcher.paa";

optics = true;

opticsZoomMin=0.35; //was 0.21

opticsZoomMax=0.35;

ammo = RPG90ammo;

count=1;

initspeed=80;

maxLeadSpeed=200;

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyRPG90: ProxyWeapon {};

};

Share this post


Link to post
Share on other sites

thx alot mate ur a genius.....

one more thing... how come the game wont let u have more than one rpg? it crashes. is it because the original one only lets u use 1?

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  

×