Ropes – Arma 3
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page creation) |
(link to config.cpp) |
||
(One intermediate revision by one other user not shown) | |||
Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Config declaration: | [[Config.cpp]] declaration: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
class CfgVehicles | class CfgVehicles | ||
Line 24: | Line 24: | ||
class RopeRabbit : Rope | class RopeRabbit : Rope | ||
{ | { | ||
maxRelLenght = 1.1; | maxRelLenght = 1.1; // "Lenght" is a typo but intentional! Same for maxExtraLenght | ||
maxExtraLenght = 20; | maxExtraLenght = 20; | ||
springFactor = 0.5; // higher == less stretchy rope | springFactor = 0.5; // higher == less stretchy rope |
Latest revision as of 12:16, 27 February 2022
Commands
See Ropes and Sling Loading command group.
Config
Rope Type
A rope stretches and breaks following the formula:
const float maxRopeStretchLength = (desiredLength * maxRelLength) + maxExtraLength;
if (currentLength > maxRopeStretchLength) { /* breaks */ };
Config.cpp declaration:
class CfgVehicles
{
class Rope;
class RopeRabbit : Rope
{
maxRelLenght = 1.1; // "Lenght" is a typo but intentional! Same for maxExtraLenght
maxExtraLenght = 20;
springFactor = 0.5; // higher == less stretchy rope
segmentType = "RopeSegmentRabbit"; // reference to CfgNonAIVehicles' class
torqueFactor = 0.5;
dampingFactor[] = {1.0,2.5,1.0};
model = "\A3\Animals_F\rabbit\rabbit_F.p3d";
};
};
class CfgNonAIVehicles
{
class RopeSegmentRabbit
{
scope = 2;
displayName = "";
simulation = "ropesegment";
autocenter = 0;
animated = 0;
model = "\A3\Animals_F\rabbit\rabbit_F.p3d";
};
};
Rope End
TBD