Building Land Classes: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "y[ _]*\|[ _]*(arma[0-9]+)[ _]*\|[ _]+" to "y|$1|") |
Lou Montana (talk | contribs) (Page refresh - mimimi removal) |
||
Line 1: | Line 1: | ||
The building ruins system introduced in {{arma1}} is quite different from the one in {{ofp}}. | |||
In {{ofp}}, a destroyed building saw its vertices moved, twisting its 3D model as well as its collision LOD - making this a very cheap but improvable system. | |||
In | In {{arma1}}, the original building moves under the terrain to simulate collapsing; the damage also changes from 1 back to 0.<br> | ||
Destroyed Buildings that used the DestructEngine type will vaporise (dissappear) unless a ruins model is associated with them. | |||
{{Feature|important|The class needs to be called <tt>Land_''xxx''</tt> for ruins to work.}} | |||
{{Feature|arma1|the class needs to be called <tt>Land_''xxx''</tt> for building animations to work in {{arma1}}; this is not true for later titles.}} | |||
<syntaxhighlight lang="cpp"> | |||
class CfgVehicles | |||
{ | |||
class House; | |||
class MyHouse : House | |||
{ | |||
/* ... */ | |||
}; | |||
class CfgVehicles | |||
{ | |||
class Ruins; // required for the ruin model | |||
class NonStrategic; | |||
class House : NonStrategic | |||
{ | |||
class DestructionEffects; // re-declaration is needed | |||
}; | |||
class Land_MyRuinedHouseModel : Ruins // note the Land_ prefix | |||
{ | |||
scope = 1; // protected scope - not shown in editor | |||
displayname = "My House Ruins"; | |||
model = \some\ruinedBuilding\MyRuinedHouseModel; // .p3d extension is optional - note that the Land_ prefix is not required | |||
}; | |||
class Land_MyHouse : House // note the Land_ prefix | |||
{ | |||
/* ... */ | |||
class DestructionEffects : DestructionEffects | |||
{ | |||
class Ruin1 | |||
{ | |||
simulation = "ruin"; | |||
type= \some\path\MyRuinedHouseModel; // .p3d extension is optional - note that the Land_ prefix is not required | |||
position = ""; | |||
intensity = 1; | |||
interval = 1; | |||
lifeTime = 1; | |||
}; | |||
}; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
{{GameCategory|arma1|Addon Configuration}} | {{GameCategory|arma1|Addon Configuration}} | ||
{{GameCategory|arma1|Terrain Editing}} | {{GameCategory|arma1|Terrain Editing}} |
Revision as of 17:56, 17 July 2021
The building ruins system introduced in Armed Assault is quite different from the one in Operation Flashpoint. In Operation Flashpoint, a destroyed building saw its vertices moved, twisting its 3D model as well as its collision LOD - making this a very cheap but improvable system.
In Armed Assault, the original building moves under the terrain to simulate collapsing; the damage also changes from 1 back to 0.
Destroyed Buildings that used the DestructEngine type will vaporise (dissappear) unless a ruins model is associated with them.
class CfgVehicles
{
class House;
class MyHouse : House
{
/* ... */
};
class CfgVehicles
{
class Ruins; // required for the ruin model
class NonStrategic;
class House : NonStrategic
{
class DestructionEffects; // re-declaration is needed
};
class Land_MyRuinedHouseModel : Ruins // note the Land_ prefix
{
scope = 1; // protected scope - not shown in editor
displayname = "My House Ruins";
model = \some\ruinedBuilding\MyRuinedHouseModel; // .p3d extension is optional - note that the Land_ prefix is not required
};
class Land_MyHouse : House // note the Land_ prefix
{
/* ... */
class DestructionEffects : DestructionEffects
{
class Ruin1
{
simulation = "ruin";
type= \some\path\MyRuinedHouseModel; // .p3d extension is optional - note that the Land_ prefix is not required
position = "";
intensity = 1;
interval = 1;
lifeTime = 1;
};
};
};
};
};