der bastler
Oct 22 2002, 13:59
After analyzing the demo model of the streetlamp I've create my own model with one resolution lod and one point in memory lod named "Light".
Here is it's config file:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class BastlersTacticalFlashlight
{
units[] = {TacticalFlashlight};
weapons[] = {};
requiredVersion = 1.70;
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class Strategic: Building {};
class TacticalFlashlight: Strategic
{
scope = 2;
vehicleClass = "Objects";
displayname = "Tactical Flashlight"
model = "\taclight2\taclight2_proxy.p3d";
simulation = "StreetLamp";
colorDiffuse[] = {0.900000,0.800000,0.600000};
colorAmbient[] = {0.100000,0.100000,0.100000};
brightness = 1;
class UserActions
{
class Einschalten
{
displayName = "$STR_ACTION_LIGHTON";
position = "Light";
radius = 0.8;
condition = "LightIsOn this != ""ON""";
statement = "this SwitchLight ""ON""";
};
class Ausschalten
{
displayName = "$STR_ACTION_LIGHTOFF";
position = "Light";
radius = 0.8;
condition = "LightIsOn this != ""OFF""";
statement = "this SwitchLight ""OFF""";
};
};
};
};
[/QUOTE]<span id='postcolor'>
But: OFP crashes when I try to preview the object in the editor! WHY?
Here is it's config file:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class BastlersTacticalFlashlight
{
units[] = {TacticalFlashlight};
weapons[] = {};
requiredVersion = 1.70;
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class Strategic: Building {};
class TacticalFlashlight: Strategic
{
scope = 2;
vehicleClass = "Objects";
displayname = "Tactical Flashlight"
model = "\taclight2\taclight2_proxy.p3d";
simulation = "StreetLamp";
colorDiffuse[] = {0.900000,0.800000,0.600000};
colorAmbient[] = {0.100000,0.100000,0.100000};
brightness = 1;
class UserActions
{
class Einschalten
{
displayName = "$STR_ACTION_LIGHTON";
position = "Light";
radius = 0.8;
condition = "LightIsOn this != ""ON""";
statement = "this SwitchLight ""ON""";
};
class Ausschalten
{
displayName = "$STR_ACTION_LIGHTOFF";
position = "Light";
radius = 0.8;
condition = "LightIsOn this != ""OFF""";
statement = "this SwitchLight ""OFF""";
};
};
};
};
[/QUOTE]<span id='postcolor'>
But: OFP crashes when I try to preview the object in the editor! WHY?