Jump to content
Sign in to follow this  
bk1276

Vehicles attached to Vehicle

Recommended Posts

ive bean trying to follow this thread Vehicles attached to Ship as im haveing roughly

the same problem as Aplion .

I cant get the option to appear or anything to attatch

class UserActions

class UserActions

{

class Prepford

{

displayName = "prepair to ford";

position = "forkpoint";

radius = 10;

onlyForPlayer = 0;

condition = "this animationphase ""pontoon01"" < 0.5 and player in this;";

statement = "[this] exec ""\bk12_m2_ferry\scr\Prepford.sqs""";

};

class Prepland

{

displayName = "prepair to land";

position = "forkpoint";

radius = 10;

onlyForPlayer = 0;

condition = "this animationphase ""pontoon02"" > 0.5 and player in this;";

statement = "[this] exec ""\bk12_m2_ferry\scr\Prepland.sqs""";

};

class PosCenter

{

displayName="PosCenter cargo";

position="forkpoint";

radius=20;

onlyforplayer=0;

condition="((this getVariable ""PosCenter"") == 0)< 0.5 and player in this;";

statement= "this setVariable [""PosCenter"", 1, true];;[this, vehicle player, ""PosCenter""] execVM ""\bk12_m2_ferry\scr\Dock.sqf""";

};

dock.sqf

private["_m2_ferry","_car"];

_m2_ferry = _this select 0;

_car = _this select 1;

_StoreLoc = _this select 2;

_car attachto [_m2_ferry,(_m2_ferry modeltoworld (_m2_ferry selectionposition _StoreLoc))];

driver _car action ["engineOff", _car];

sleep 2;

while {(alive _car) and (alive _m2_ferry) and ((_m2_ferry getVariable _StoreLoc) == 1)} do {};

detach _car;

if the full config or the model.cfg neads to be posted ask as im so close to a initial release

all help is welcome

Share this post


Link to post
Share on other sites

not much of a scripter, what i can tell you is what u need otherwise. selection forkpoint must be mentioned in the sections list in the model config. it usually doesnt need a bone in cfgskeletons but if forkpoint is part of a animation, like f.e. a doorknob usually is part of the door, in that case forkpoint must of course be part of that animated section, not as a bone, but as part of the section in o2.

where to put forkpoint? memory lod for sure but i would end up adding it pretty much anywhere except of the geometry lod´s, doesnt hurt, just to be sure. since u have 2 user animations as condition i would reassure that these animations work like intended, otherwise take them out of the condition for now, would be generally a good idea to see if u get the useraction ingame without any condition set.

The animationsources pontoon01+pontoon02 must be in defined in the config under exactly these names, best you really post the complete stuff, i.e. modelcfg and config.

Share this post


Link to post
Share on other sites
not much of a scripter, what i can tell you is what u need otherwise. selection forkpoint must be mentioned in the sections list in the model config. it usually doesnt need a bone in cfgskeletons but if forkpoint is part of a animation, like f.e. a doorknob usually is part of the door, in that case forkpoint must of course be part of that animated section, not as a bone, but as part of the section in o2.

where to put forkpoint? memory lod for sure but i would end up adding it pretty much anywhere except of the geometry lod´s, doesnt hurt, just to be sure. since u have 2 user animations as condition i would reassure that these animations work like intended, otherwise take them out of the condition for now, would be generally a good idea to see if u get the useraction ingame without any condition set.

The animationsources pontoon01+pontoon02 must be in defined in the config under exactly these names, best you really post the complete stuff, i.e. modelcfg and config.

thanks for the reply scars09

full config

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class bk12_m2_ferry

{

units[] = {};

weapons[] = {};

};

};

class CfgFactionClasses

{

class UK_ARMED_FORCES

{

displayName = "UK Armed Forces";

priority = 1;

side = 1;

};

};

class cfgVehicleClasses

{

class TRUCK_Wheeled_uk

{

displayName = "TRUCK Wheeled enginer";

};

};

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class LandVehicle: Land {};

class Car: LandVehicle {};

class Truck: Car {};

class Truck5T: Truck {};

class bk12_m2_ferry: Truck5T

{

scope=public;

model="\bk12_m2_ferry\bk12_m2_ferry";

displayName="m2 ferry";

side=1;

faction = "UK_ARMED_FORCES";

vehicleClass = "TRUCK_Wheeled_uk";

crew = "BAF_soldier_W";

driverAction = "HMMWV_Driver";

transportSoldier = 2;

typicalCargo[] = {"BAF_soldier_W","BAF_soldier_W"};

cargoAction[] = {"Truck_Cargo01"};

driverIsCommander = 1;

hasGunner = 0;

weapons[] = {"SportCarHorn"};

magazines[] = {};

class Turrets{};

accuracy=0.30;

nameSound = "";

// soundEngine[]={"\bk12_m2_ferry\engine.wss",1.2,1};

maneuvrability=2.0;

maxSpeed=60;

armor=50;

cost=200;

canFloat=1;

type = 1;

threat[]={0.1, 0.1, 0.7};

brakeDistance=5;

steerAheadSimul=1.0;

steerAheadPlan=2.0;

damperSize = 0.2;

damperForce = 1;

hiddenSelections[] = {};

// "plank01s","plank02s","plank03s","plank04s" ,"plank01","plank02","plank03","plank04"

selectionBackLights = "light_back";

selectionBrakeLights = "light_brake";

extCameraPosition[]={0,2,-19};

class Exhausts

{

class Exhaust1

{

position = "vyfuk start";

direction = "vyfuk konec";

effect = "ExhaustsEffectBig";

};

class Exhaust2

{

position = "vyfuk start2";

direction = "vyfuk konec2";

effect = "ExhaustsEffectBig";

};

};

class Reflectors {

class Left {

color[] = {0.5, 0.8, 1.0, 1.0};

ambient[] = {0.07, 0.07, 0.07, 1.0};

position = "L svetlo";

direction = "konec L svetla";

hitpoint = "L svetlo";

selection = "L svetlo";

size = 1;

brightness = 0.7;

};

class Right {

color[] = {0.5, 0.8, 1.0, 1.0};

ambient[] = {0.07, 0.07, 0.07, 1.0};

position = "P svetlo";

direction = "konec P svetla";

hitpoint = "P svetlo";

selection = "P svetlo";

size = 1;

brightness = 0.7;

};

};

class AnimationSources

{

class UserHideplank01

{

source = "user";

initPhase=0;

animPeriod = 0.05;

};

class UserHideplank02

{

source = "user";

initPhase=0;

animPeriod = 0.05;

};

class UserHideplank03

{

source = "user";

initPhase=0;

animPeriod = 0.05;

};

class UserHideplank04

{

source = "user";

initPhase=0;

animPeriod = 0.05;

};

class UserHideplank01s

{

source = "user";

initPhase=1;

animPeriod = 0.05;

};

class UserHideplank02s

{

source = "user";

initPhase=1;

animPeriod = 0.05;

};

class UserHideplank03s

{

source = "user";

initPhase=1;

animPeriod = 0.05;

};

class UserHideplank04s

{

source = "user";

initPhase=1;

animPeriod = 0.05;

};

class landcontact

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class crane

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class crane02

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class wheels

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class new_hull

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class pontoon01

{

source = "user";

animPeriod = 8;

initPhase = 0;

};

class pontoon02

{

source = "user";

animPeriod = 8;

initPhase = 0;

};

class WheelL_01_v

{

source = "user";

animPeriod = 2;

initPhase = 0;

};

class WheelL_02_v

{

source = "user";

animPeriod = 2;

initPhase = 0;

};

class WheelR_01_v

{

source = "user";

animPeriod = 2;

initPhase = 0;

};

class WheelR_02_v

{

source = "user";

animPeriod = 2;

initPhase = 0;

};

class splash_01

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class splash_02

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class splash_01_bar

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

class splash_02_bar

{

source = "user";

animPeriod = 4;

initPhase = 0;

};

};

class EventHandlers

{

init = "_sxr = _this execvm ""\bk12_m2_ferry\scr\ferryInit.sqf""; ";

};

class UserActions

{

class Prepford

{

displayName = "prepair to ford";

position = "forkpoint";

radius = 10;

onlyForPlayer = 0;

condition = "this animationphase ""pontoon01"" < 0.5 and player in this;";

statement = "[this] exec ""\bk12_m2_ferry\scr\Prepford.sqs""";

};

class Prepland

{

displayName = "prepair to land";

position = "forkpoint";

radius = 10;

onlyForPlayer = 0;

condition = "this animationphase ""pontoon02"" > 0.5 and player in this;";

statement = "[this] exec ""\bk12_m2_ferry\scr\Prepland.sqs""";

};

class PosCenter

{

displayName="PosCenter cargo";

position="forkpoint";

radius=20;

onlyforplayer=0;

condition="((this getVariable ""PosCenter"") == 0)";

statement= "this setVariable [""PosCenter"", 1, true];;[this, vehicle player, ""PosCenter""] execVM ""\bk12_m2_ferry\scr\Dock.sqf""";

};

};

};

};

and the full mosel cfg

class CfgSkeletons

{

class Default {};

class Truck5T : Default {};

class bk12_m2_ferry_Bones: Truck5T

{

isDiscrete=1;

skeletonInherit = ""; //Inherit all bones from class Car.

skeletonBones[]=

{

"PosCenter","new_hull",

"plank01","pontoon02",

"plank02","pontoon02",

"plank03","pontoon01",

"plank04","pontoon01",

"splash_01_bar","splash_01",

"plank01s","new_hull",

"plank02s","new_hull",

"plank03s","new_hull",

"plank04s","new_hull",

"floatwheels","",

"wheelL_01","",

"wheelL_02","",

"wheelR_01","",

"wheelR_02","",

"splash_01","pontoon01",

"splash_01_bar","splash_01",

"splash_02","pontoon02",

"splash_02_bar","splash_02",

"wheelL_01_Damper","",

"wheelR_01_Damper","",

"wheelL_02_Damper","",

"wheelR_02_Damper","",

"new_hull","",

"pontoon01","new_hull",

"pontoon02","new_hull",

"crane02","crane01",

"crane01","crane",

// "crane01","new_hull",

"crane","new_hull",

"crane02","crane",

"crane01","new_hull",

"landcontact","new_hull",

"steering_wheel","new_hull"

};

};

};

class CfgModels

{

class Default

{

sections[] = {""};

sectionsInherit="";

};

class Car : Default {};

class bk12_m2_ferry

{

sectionsInherit="Car";

sections[]=

{

"PosCenter","",

"floatwheels","",

"landcontact","",

"wheelL_01",

"wheelL_02",

"wheelR_01",

"wheelR_02",

"splash_01",

"splash_02",

"wheelL_01_Damper",

"wheelL_02_Damper",

"wheelR_01_Damper",

"wheelR_02_Damper",

"new_hull",

"crane",

"crane01",

"crane02",

"plank01",

"plank02",

"plank03",

"plank04",

"plank01s",

"plank02s",

"plank03s",

"plank04s",

"brake light",

"light_Front_Left",

"light_Front_Right",

"rear light",

"P svetlo",

"L svetlo",

"steering_wheel",

"Light_1_1",

"Light_1_2",

"pontoon01",

"pontoon02",

"splash_01_bar",

"splash_02_bar"

};

skeletonName="bk12_m2_ferry_Bones";

class Animations

{

class WheelL_01

{

type="rotationX";

source="wheel";

selection="wheelL_01";

axis="axis_wheell_01";

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class WheelL_02 : WheelL_01

{ type="rotationX";

source="wheel";

selection="wheelL_02";

axis="axis_wheelL_02";

memory=false;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class WheelR_01: WheelL_01

{ type="rotationX";

source="wheel";

selection="WheelR_01";

axis="axis_WheelR_01";

memory=false;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class WheelR_02 : WheelL_01

{ type="rotationX";

source="wheel";

selection="WheelR_02";

axis="axis_WheelR_02";

memory=false;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class WheelL_01_Steering

{

type="rotationY";

source="drivingWheel";

selection="wheelL_01";

axis="";

memory=false;

sourceAddress="clamp";

minValue=-1;

maxValue=1;

angle0="rad +30";

angle1="rad -30";

};

class WheelR_01_Steering : WheelL_01_Steering

{

selection="wheelR_01";

};

class SteeringWheel : WheelL_01_Steering

{

type="rotation";

selection="steering_wheel";

axis="axis_steeringWheel";

minValue=-1;

maxValue=1;

angle0="rad -30";

angle1="rad +30";

};

class WheelL_01_Damper

{

type="translationY";

source = "damper";

selection = "WheelL_01";

axis = "damper_wheell_01";

memory = 1;

sourceAddress = "clamp";

minValue = 0;

maxValue = 1;

angle0 =0;

angle1 = "15";

};

class WheelL_02_Damper : WheelL_01_Damper

{

selection ="WheelL_02";

axis = "damper_wheell_02";

};

class WheelR_01_Damper : WheelL_01_Damper

{

selection ="WheelR_01";

axis = "damper_wheelr_01";

};

class WheelR_02_Damper : WheelL_01_Damper

{

selection ="WheelR_02";

axis = "damper_wheelr_02";

};

class crane

{ type = "rotation";

animPeriod = 4;

source ="user";

axis="axis_crane";

selection = "crane";

angle0="rad 0";

angle1="rad -90";

};

class crane02

{ type = "rotation";

animPeriod = 4;

source ="user";

axis="axis_crane02";

selection = "crane02";

angle0="rad 0";

angle1="rad -180";

};

class plank01

{

type ="hide";

source="UserHideplank01";

selection="plank01";

minValue = 0.0;

maxValue = 0.1;

hideValue = 1;

};

class plank02

{

type ="hide";

source="UserHideplank02";

selection="plank02";

minValue = 0.0;

maxValue = 0.1;

hideValue = 1;

};

class plank03

{

type ="hide";

source="UserHideplank03";

selection="plank03";

minValue = 0.0;

maxValue = 0.1;

hideValue = 1;

};

class plank04

{

type ="hide";

source="UserHideplank04";

selection="plank04";

minValue = 0.0;

maxValue = 0.1;

hideValue = 1;

};

class plank01s

{

type ="hide";

source="UserHideplank01s";

selection="plank01s";

hideValue = 1;

};

class plank02s

{

type ="hide";

source="UserHideplank02s";

selection="plank02s";

hideValue = 1;

};

class plank03s

{

type ="hide";

source="UserHideplank03s";

selection="plank03s";

hideValue = 1;

};

class plank04s

{

type ="hide";

source="UserHideplank04s";

selection="plank04s";

hideValue = 1;

};

class pontoon02

{ type = "rotation";

animPeriod = 8;

source ="user";

axis="pontoon02axis";

selection = "pontoon02";

angle0="rad 0";

angle1="rad +180";

};

class pontoon01

{ type = "rotation";

animPeriod = 8;

source = "user";

axis="pontoon01axis";

selection = "pontoon01";

angle0="rad 0";

angle1="rad -180";

};

class LandContact

{

type="translation";

source="MvA1";

memory = 1;//by default

selection="floatwheels";

axis="main_axis";

animPeriod =5.0;

minValue=-0.0000;

maxValue=1.0000;

offset0=0;

offset1=1.100;

};

class new_hull

{

type="translation";

initPhase=1;

source = "user";

sourceAddress = "clamp";

selection="new_hull";

begin="main_axis_start";

end="main_axis_end";

memory=1;

animPeriod =5.0;

minValue=-0.0000;

maxValue=1.0000;

offset0=0;

offset1=.65;

};

class splash_01

{

type = "rotation";

animPeriod = 8;

source = "user";

axis="splash_01axis";

selection = "splash_01";

angle0="rad 0";

angle1="rad 120";

};

class splash_02

{

type = "rotation";

animPeriod = 8;

source = "user";

axis="splash_02axis";

selection = "splash_02";

angle0="rad 0";

angle1="rad -120";

};

class splash_01_bar

{

type = "rotation";

animPeriod = 8;

source = "user";

axis="splash_01_bar_axis";

selection = "splash_01_bar";

angle0="rad 0";

angle1="rad 160";

};

class splash_02_bar

{

type = "rotation";

animPeriod = 8;

source = "user";

axis="splash_02_bar_axis";

selection = "splash_02_bar";

angle0="rad 0";

angle1="rad 160";

};

};

};

};

I hope you are or any one else is able to help

bk

Share this post


Link to post
Share on other sites

wow, my brain hurt from trying to imagine the skeleton, wich bone is attached to what. But thats just cause of the ammount of bones and lacking the model to bring it in context i guess.

Ok, the reason for your problem is most likely the missing "forkpoint" entry in model.cfg.

class CfgModels

{

class Default

{

sections[] = {""};

sectionsInherit="";

};

class Car : Default {};

class bk12_m2_ferry

{

sectionsInherit="Car";

sections[]=

{

"PosCenter","floatwheels","landcontact","wheelL_01","wheelL_02","wheelR_01","wheelR_02","splash_01","splash_02","wheelL_01_Damper","wheelL_02_Damper","wheelR_01_Damper","wheelR_02_Damper","new_hull","crane","crane01","crane02","plank01","plank02","plank03","plank04","plank01s","plank02s","plank03s","plank04s","brake light","light_Front_Left","light_Front_Right","rear light","P svetlo","L svetlo","steering_wheel","Light_1_1","Light_1_2","pontoon01","pontoon02","splash_01_bar","splash_02_bar","forkpoint"

};

this sections list has nothing to do with the skeleton where a "" entry declares that it is a bone unattached to another. like "MainTurret","", 1st entry what you attach, 2nd entry what you attach it too, like in "MainGun","MainTurret", where u attach the gun to the turret. everything you attach to the gun afterwards is therefor automatically also attached to the turret, cause the mainbone is. But that just as info.

the sections list is more or less just a info for the game what named sections there are and what to look for. each of this named sections should have a named selection in o2 of same name. this named selections can be of different shape depending in wich LOD they are present, good example are the lights, L svetlo is a face with the headlight texture in LOD1 and in memory lod L svetlo is 2 memory points, usti L svetla and konec L svetla (if i remember right, czech naming lol). no matter if its just a memorypoint in memory LOD or different things in several LOD, the game wont recognize it unless its in the section list (if it does it anyway its most likely cause you sticked with the original naming and it got inherited in some form).

So if there is a forkpoint selection in o2, a memorypoint with that name for example, you should now at least get the option for the useraction.

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  

×