Hi folks!
Got a problem here with making a small addon for my new special "mission":
In my new "mission" a huge amount of smoke is shown at the same time (about 18 smokeshells). Now only very high end computers would show these smokeshells in a framerate above 20. Thats too slow, because the timing of the mission gets a little bit "confused". I need perfect timings, the mission wonÂ't work without this perfect timing.
So i decided to make a small addon, TOV_1_Smokeshells.pbo. It should include the smoke-algorithm of FINMOD, because this algorithm is very "processor-friendly"
Here is the config.cpp of my new Smokeshells, I made a new CfgAmmo class for it, its called "TOVSmokeshellAmmo".
Also I made a new CfgWeaponsclass, its called "TOVSmokeShellWhite".
There should also be a new Man (its a new subclass of a civilian2), its called "TOVSmokemanWhite". He has to carry a M16 with 2 mags and 2 of these new smokeshells.
At the moment the addon is working with no errormessages (wow
), but
the new TOVSmokeshellWhite is not usable by a soldier. In the "GEAR" Screen on the map it is shown, but I canÂ't use it.
Please, help!
Here is the code:
#define TSound -1
#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 private 0
#define protected 1
#define public 2
#define WeaponNoSlot 0 // dummy weapons
#define WeaponSlotPrimary 1 // primary weapons
#define WeaponSlotSecondary 16 // secondary weapons
#define WeaponSlotItem 256 // items (Magazine)
#define WeaponSlotBinocular 4096 // binocular
#define WeaponHardMounted 65536
#define WeaponPrimary 0
#define WeaponSecondary 10
class CfgPatches
{
class TOVSmokemanWhite
{
units[] = {TOVSmokemanWhite};
weapons[] = {};
requiredVersion = 1.20;
};
};
class CfgAmmo
{
class Default{};
class Grenadelauncher:Default{};
class Smokeshell:Grenadelauncher{};
class TOVSmokeshellAmmo: Smokeshell
{
hit = 0;
indirecthit = 0;
indirecthitrange = 0;
simulation = "";
explosive = 0;
visiblefire = 0;
audiblefire = 0;
visiblefiretime = 0;
minrange = 0;
minrangeprobab = 100;
midrange = 15;
midrangeprobab = 80;
maxrange = 30;
maxrangeprobab = 40;
hitground[] = {};
hitman[] = {};
hitarmor[] = {};
hitbuilding[] = {};
cartrigde = {};
tracercolor[] = {};
tracercolorR[] = {};
airlock = 0;
manualcontrol = 0;
maxControlRange = 0;
inittime = 0;
thrusttime = 0;
thrust = 0;
maneuvrability = 0;
irlock = 0;
laserlock = 0;
proxyshape = "";
lightcolor[] = {0.0,0.0,0.0,0.0};
smokeColor[] = {1, 1, 1, 0};
// VALUES FROM FINMOD
// .
// .
// .
// .
class Smoke
{
interval = 0.13;
cloudletDuration = 8.0;
cloudletAnimPeriod = 1.0;
cloudletSize = 0.95;
cloudletAlpha = 1.0;
cloudletGrowUp = 1.0;
cloudletFadeIn = 0.0;
cloudletFadeOut = 1.0;
cloudletAccY = -0.3;
cloudletMinYSpeed = 0;
cloudletMaxYSpeed = 10;
cloudletShape = "cl_basic";
cloudletColor[] = {1, 1, 1, 0};
initT = 1000;
deltaT = -500;
class Table
{
class T1 {maxT = 0; color[] = {0.7, 0.7, 0.7, 1};}
class T2 {maxT = 1000; color[] = {0.4, 0.4, 0.4, 1};}
};
density = 1.5;
size = 2.0;
initYSpeed = 1.0;
timeToLive = 1e20;
in = 3.0;
out = 0.0;
};
};
};
class CfgWeapons
{
class Default{};
class Grenadelauncher:Default{};
class Smokeshell:Grenadelauncher{};
class TOVSmokeShellWhite: Smokeshell
{
// valueMagazine = 2;
scopeweapon = public;
scopemagazine = public;
magazinetype = WeaponSlotItem;
candrop = 1;
ammo = TOVSmokeShellAmmo;
picture = "\dtaext\equip\m\m_smokeshell.paa"
displayName = "TOV Smokeshell White";
displayNameMagazine = "TOV Smokeshell White";
shortNameMagazine = "TOVSmokeWhite_short";
sound[] = {"\Sound\Weapons\missile.wss",0.000316,1};
};
};
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Civilian:Man{};
class Civilian2:Civilian{};
class TOVSmokeManWhite:Civilian2
{
displayName = "TOVSmokemanWhite";
weapons[] = {M16};
magazines[] = {M16, M16, TOVSmokeshellWhite, TOVSmokeshellWhite};
};
};
Greez,
TOViper