Jump to content
Sign in to follow this  
DPS -CCCP-

Custom ruins models for custom buildings

Recommended Posts

Hello.

I have created a building, and configured this, that when building is destructed, it's falling down and there is destruction (ruin) model that created in place, were building was before destruction. Like most of standart buildings in ArmA...

But when I try to use my own created "ruin" model in config, I have no results in game (ruined model don't loading).

Here a part from config, that should load ruined object after destruction:

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

class DestructionEffects: DestructionEffects

{

class CB_b1_ruins

{

simulation = ruin;

type=\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

position="";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

Custom ruin object won't load (there is no difference what I have in custom model: complex model, simple box or just renamed one of original ruins model from ArmA, so the broblem is not in the model)

But if I replace

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

type=\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

with

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

type=\ca\buildings\ruins\Panelak3_ruins.p3d;

all works well with in-game ruin model. But I want use my own..

p.s.

38276606kb4.th.jpg

34688252dr0.th.jpg

26571272jx1.th.jpg

40523906md0.th.jpg

87890764qs6.th.jpg

Share this post


Link to post
Share on other sites

try to put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">type=\ca\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

Share this post


Link to post
Share on other sites
try to put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">type=\ca\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

No changes:(

Share this post


Link to post
Share on other sites

You also need a config for your ruins model, otherwise the engine doesn't know what to do with the model.

The class MUST be land_(modelname).

So, in your case, the classname MUST be "land_OWP_CB_b1_ruins".

Just configure the ruins like any other building, but it MUST use the classname above!

Share this post


Link to post
Share on other sites

General Barron

Wow! It's work! Thank you:)

Didn't think about that "land_" in name can affect something...

Share this post


Link to post
Share on other sites
@ Mar. 05 2008,15:32)]Didn't think about that "land_" in name can affect something...

land_ is also required if you want your visitor-placed objects to have a config.

When you load a map, for every object on the map it will look for a config with the name land_(modelname). If it finds it, the config will be used for that map-placed object.

Note this only happens if the model has simulation=house or building in the named properties, I believe.

Anyway, this is how you can have things like working doors or lights for visitor placed objects (as opposed to only editor-placed objects).

Share this post


Link to post
Share on other sites
@ Mar. 05 2008,15:32)]Didn't think about that "land_" in name can affect something...

land_ is also required if you want your visitor-placed objects to have a config.

When you place a model in visitor, it will look for a config with the name land_(modelname).

Note this only happens if the model has simulation=house or building in the named properties, I believe.

Anyway, this is how you can have things like working doors or lights for visitor placed objects.

Thank you for usefull info!

Share this post


Link to post
Share on other sites

Any chance you can share your config. I have a door model that when destroyed i want to show a ruin model of the door. I too am not getting any model showing up when the door is destroyed - any help greatly appreciated

Share this post


Link to post
Share on other sites
Any chance you can share your config. I have a door model that when destroyed i want to show a ruin model of the door. I too am not getting any model showing up when the door is destroyed - any help greatly appreciated

I'm not shure what exactly you mean, but here is a config, I hope it will help you.

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

#define private 0

#define protected 1

#define public 2

#define true 1

#define false 0

#define VSoft 0

#define VArmor 1

#define VAir 2

#define CanSeeRadar 1

#define CanSeeEye 2

#define CanSeeOptics 4

#define CanSeeEar 8

#define CanSeeCompass 16

#define CanSeeRadarC CanSeeRadar+CanSeeCompass

#define CanSeeAll 31

#define TRACERNO tracerColor[]={0,0,0,0};tracerColorR[]={0,0,0,0};

class CfgPatches

{

class OWPCB

{

units[] = {};

weapons[] = {};

requiredVersion = 1.00;

};

};

class CfgVehicleClasses

{

class OWP_CB

{

displayName = "OWP civilian buildings";

};

};

class CfgVehicles

{

class Ruins;

class land_OWP_CB_b1_ruins: Ruins

{

scope=public;

vehicleClass=OWP_CB;

model=\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

displayName=P44 ruins;

};

class HouseBase;

class House : HouseBase

{

class DestructionEffects;

};

class land_OWP_CB_b1 : house

{

animated=1;

vehicleclass = "OWP_CB";

scope = public;

model = "\OWP_cb\OWP_CB_b1";

ladders[] = {};

displayName = "P44";

reversed = "false";

mapSize = 74;

Icon="\OWP_cb\data\build1_1_map.paa";

armor=1000;

class DestructionEffects: DestructionEffects

{

class Ruin1

{

simulation = ruin;

type=\OWP_cb\ruins\OWP_CB_b1_ruins.p3d;

position="";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

class AnimationSources

{

class Door1

{

source = "user";

animPeriod = 1;

initPhase=0;

};

class Door2: Door1{};

class Door3: Door1{};

class LightWindow1

{

source = "user";

animPeriod = 1;

initPhase=1;

};

class LightWindow2: LightWindow1{};

};

class UserActions

{

class OpenDoor1

{

displayNameDefault = $STR_DN_OUT_O_DOOR_DEFAULT;

displayName = $STR_DN_OUT_O_DOOR;

position = door1_axis;

radius = 2.5;

onlyForPlayer = true;

condition = "this animationPhase ""Door1"" < 0.5";

statement = "this animate [""Door1"", 1]";

};

class CloseDoor1

{

displayNameDefault = $STR_DN_OUT_C_DOOR_DEFAULT;

displayName = $STR_DN_OUT_C_DOOR;

position = door1_axis;

radius = 2.5;

onlyForPlayer = true;

condition = "this animationPhase ""Door1"" >= 0.5";

statement = "this animate [""Door1"", 0]";

};

class OpenDoor2: OpenDoor1

{

position = door2_axis;

condition = "this animationPhase ""Door2"" < 0.5";

statement = "this animate [""Door2"", 1]";

};

class CloseDoor2: CloseDoor1

{

position = door2_axis;

condition = "this animationPhase ""Door2"" >= 0.5";

statement = "this animate [""Door2"", 0]";

};

class OpenDoor3: OpenDoor1

{

position = door3_axis;

condition = "this animationPhase ""Door3"" < 0.5";

statement = "this animate [""Door3"", 1]";

};

class CloseDoor3: CloseDoor1

{

position = door3_axis;

condition = "this animationPhase ""Door3"" >= 0.5";

statement = "this animate [""Door3"", 0]";

};

};

};

};

Share this post


Link to post
Share on other sites

Still no joy !

Here is the config.cpp

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

#define protected 1

#define public 2

#define true 1

#define false 0

#define VSoft 0

#define VArmor 1

#define VAir 2

#define CanSeeRadar 1

#define CanSeeEye 2

#define CanSeeOptics 4

#define CanSeeEar 8

#define CanSeeCompass 16

#define CanSeeRadarC CanSeeRadar+CanSeeCompass

#define CanSeeAll 31

#define TRACERNO tracerColor[]={0,0,0,0};tracerColorR[]={0,0,0,0};

class CfgPatches

{

class bunkerdoor

{

units[] = {};

weapons[] = {};

requiredVersion = 1.00;

};

};

class CfgVehicleClasses

{

class bunker_door

{

displayName = "bunker door";

};

};

class CfgVehicles

{

class Ruins;

class land_bunker_door_ruins: Ruins

{

scope=public;

vehicleClass=bunker_door;

model=\pointeduhoc\objects\ruins\bunker_door_ruins.p3d;

};

class HouseBase;

class House : HouseBase

{

class DestructionEffects;

};

class land_bunker_door : house

{

animated=1;

vehicleclass = "bunker_door";

scope = public;

model = "\pointeduhoc\objects\trench\bunker_door";

ladders[] = {};

armor=1000;

class DestructionEffects: DestructionEffects

{

class Ruin1

{

simulation = ruin;

type=\pointeduhoc\objects\ruins\bunker_door_ruins.p3d;

position="";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

};

};

Any clue?? I haven't given the object a class name in the named properties, i have also tried using default ruins but dont get anything when the door is destroyed ??

Share this post


Link to post
Share on other sites

Solved the problem, here is the new config should anyone else have the same problem:

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

#define protected 1

#define public 2

#define true 1

#define false 0

#define VSoft 0

#define VArmor 1

#define VAir 2

#define CanSeeRadar 1

#define CanSeeEye 2

#define CanSeeOptics 4

#define CanSeeEar 8

#define CanSeeCompass 16

#define CanSeeRadarC CanSeeRadar+CanSeeCompass

#define CanSeeAll 31

#define TRACERNO tracerColor[]={0,0,0,0};tracerColorR[]={0,0,0,0};

class CfgPatches

{

class bunkerdoor

{

units[] = {bunkerdoor};

weapons[] = {};

requiredVersion = 1.00;

};

};

class CfgVehicleClasses

{

class bunker_door

{

displayName = "bunker door";

};

};

class CfgVehicles

{

class Ruins;

class land_bunker_door_ruins: Ruins

{

scope=public;

vehicleClass = "bunker_door";

model="\ca\pointeduhoc\objects\ruins\bunker_door_ruins";

};

class HouseBase;

class House : HouseBase

{

class DestructionEffects;

};

class land_bunker_door : house

{

animated=1;

vehicleclass = "bunker_door";

scope = public;

model = "\ca\pointeduhoc\objects\trench\bunker_door";

ladders[] = {};

armor=1000;

class DestructionEffects: DestructionEffects

{

class Ruin1

{

simulation = ruin;

type=\ca\pointeduhoc\objects\ruins\bunker_door_ruins.p3d;

position="";

intensity = 1;

interval = 1;

lifeTime = 1;

};

};

class AnimationSources

{

/*class Door1

{

source = "user";

animPeriod = 1;

initPhase=0;

};

class Door2: Door1{};

class Door3: Door1{};

class LightWindow1

{

source = "user";

animPeriod = 1;

initPhase=1;

};

class LightWindow2: LightWindow1{};

};

class UserActions

{

class OpenDoor1

{

displayNameDefault = $STR_DN_OUT_O_DOOR_DEFAULT;

displayName = $STR_DN_OUT_O_DOOR;

position = door1_axis;

radius = 2.5;

onlyForPlayer = true;

condition = "this animationPhase ""Door1"" < 0.5";

statement = "this animate [""Door1"", 1]";

};

class CloseDoor1

{

displayNameDefault = $STR_DN_OUT_C_DOOR_DEFAULT;

displayName = $STR_DN_OUT_C_DOOR;

position = door1_axis;

radius = 2.5;

onlyForPlayer = true;

condition = "this animationPhase ""Door1"" >= 0.5";

statement = "this animate [""Door1"", 0]";

};

class OpenDoor2: OpenDoor1

{

position = door2_axis;

condition = "this animationPhase ""Door2"" < 0.5";

statement = "this animate [""Door2"", 1]";

};

class CloseDoor2: CloseDoor1

{

position = door2_axis;

condition = "this animationPhase ""Door2"" >= 0.5";

statement = "this animate [""Door2"", 0]";

};

class OpenDoor3: OpenDoor1

{

position = door3_axis;

condition = "this animationPhase ""Door3"" < 0.5";

statement = "this animate [""Door3"", 1]";

};

class CloseDoor3: CloseDoor1

{

position = door3_axis;

condition = "this animationPhase ""Door3"" >= 0.5";

statement = "this animate [""Door3"", 0]";

};

};*/

};

};

Thanks for the help

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  

×