Page 1 of 1

Help config (gate)

Posted: 2010-09-20 12:11:13
by kheiro
Here is the the config for the small addon (gate), not work for me.
Picture shows broblem
Image


class CfgPatches
{
class kkb_gate
{
units[] = {"kkb_gate"};
weapons[] = {};
requiredVersion = 1.00;
};
};
class CfgModels
{
class Default { };
class kkb_gate: Default
{
sections[]={"arm"};
sectionsInherit="";
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic: Building {};
class Fence: NonStrategic {};
class kkb_gate_dummy: Fence
{
accuracy=1.000;
scope=0;
vehicleClass="Objects";
model="\kkb_gate\kkb_gate.p3d";
displayName="Gate";
destrType=destructtree;
cost=100;
icon="\kkb_gate\kkb_gate.paa";

};
class kkb_gate:kkb_gate_dummy
{
Scope=2;
accuracy=1000;
displayName="KKB Gate";
animated=1;
class Animations
{
class arm
{
type="rotation";
animPeriod=3;
selection="arm";
axis="osa_arm";
angle0=0;
angle1=-1.6;
};
};
class UserActions
{
class OpenArm1
{
displayName="Open Gate";
position="osa_arm";
radius=2.5;
condition="this animationPhase ""arm"" < 0.5";
statement="this animate [""arm"", 1]";
};
class CloseArm1
{
displayName="Close Gate";
position="osa_arm";
radius=2.5;
condition="this animationPhase ""arm"" >= 0.5";
statement="this animate [""arm"", 0]";
};
};
};
};

Re: Help config (gate)

Posted: 2010-09-20 14:21:57
by Snake Man
CfgModels need to be in model.cfg but for this to have any effect you also must have the MLOD of the object, do you got it?