Hi everybody
I'm trying to implement this feature ingame with my own BHD custom buildings.
see pictures:
and
First off, let me explain something:
To create a destroyable building you need to make a simple destryed model of it, then create a proper config.
the confdig should look like this:
#define ReadAndWrite 0
#define ReadAndCreate 1
#define ReadOnly 2
#define ReadOnlyVerified 3
#define private 0
#define protected 1
#define public 2
#define true 1
#define false 0
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
class CfgPatches
{
class yourclasc
{
units[] = {};
weapons[] = {};
worlds[] = {""};
requiredVersion = 0.1;
requiredAddons[] = {};
};
};
class CfgDestroy
{
access = ReadAndCreate;
class BuildingHit
{
sound[] = {};
};
};
class yourowndestructionclasseffect
{
class DestroyPhase1
{
simulation = "destroy";
type = "\ca\buildings\ruins\leseni4x_ruins.p3d";
//type = "\BHD_m\Slums\slum8_dest.p3d";
position = "";
intensity = 1;
interval = 1;
lifeTime = 1;
};
};
class CfgDestructPos
{
class DelayedDestruction
{
timeBeforeHiding = 0.2;
hideDuration = "0.65+lifeTime*0.05";
};
};
class CfgVehicles
{
class Thing;
class Building;
class Strategic;
class NonStrategic : Building
{
class DestructionEffects;
};
class HouseBase;
class Land_VASICore;
class House : HouseBase
{
class DestructionEffects;
};
class BHD_slum8: BHD_GenObject
{
scope= public;
model = "\BHD_m\Slums\slum8.p3d";
displayName = "Slum (8)";
destrType = "DestructBuilding";
class DestructionEffects : yourowndestructionclasseffect{};
};
};
well, this should be the config, as I found in the
Buildings.pbo... but it doesn't work properly, I mean:
When you put the object ingame, you see it, so the implementation is right.
but when you destroy it, there's an error message coming up that says:
no entry "bin\config.bin/CfgDestructPos.\BHD_m\Slums\Slum8_dest.p3d"
it seems that it can't implement the model itself...
some suggestions guys?