Car Addon: Driver/Player sits on ground, not in seat |
Car Addon: Driver/Player sits on ground, not in seat |
Jan 22 2014, 09:10
Post
#1
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
Hi
I tried brssebs tutorial and my box is fine, but my car makes me mad. Textures and collision are working. But when I change to driver position, I'm sitting on the ground (and I can see the bottom side of the car). Also the wheels + steering wheel don't move. I think it's the config. How does a conifg look like when the car only should drive? Thanks for your effort and time! aney |
|
|
Jan 22 2014, 12:06
Post
#2
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
Since ArmA, you need a model.cfg file as well as a config (if you aren't binarizing your addon, you can have the model.cfg stuff in the config).
For a basic car (4 wheels and no guns) it should look something like this: CODE class Rotation; class CfgSkeletons { class Vehicle; class Car: Vehicle { skeletonInherit="Vehicle"; skeletonBones[]= { "volant", "", "levy predni tlumic", "", "pravy predni tlumic", "", "levy dalsi tlumic", "", "pravy dalsi tlumic", "", "levy predni zatoc", "levy predni tlumic", "pravy predni zatoc", "pravy predni tlumic", "levy dalsi zatoc", "levy dalsi tlumic", "pravy dalsi zatoc", "pravy dalsi tlumic", "levy prostredni tlumic", "", "pravy prostredni tlumic", "", "levy zadni tlumic", "", "pravy zadni tlumic", "", "levy predni", "levy predni zatoc", "pravy predni", "pravy predni zatoc", "levy dalsi", "levy dalsi zatoc", "pravy dalsi", "pravy dalsi zatoc", "levy prostredni", "levy prostredni tlumic", "pravy prostredni", "pravy prostredni tlumic", "levy zadni", "levy zadni tlumic", "pravy zadni", "pravy zadni tlumic", "ukaz_rychlo", "", "ukaz_rychlo2", "", "ukaz_rpm", "", "OtocVez", "", "OtocHlaven", "OtocVez", "fuel_01", "", "fuel_1", "", "prop_01", "", "prop_02", "", "prop_2", "", "prop_1", "", "damageHide", "", "damageVez", "OtocVez", "damageHlaven", "OtocHlaven" }; }; }; class CfgModels { class Vehicle; class Car: Vehicle { sectionsInherit="Vehicle"; sections[]= { "ammo", "sklo predni p", "sklo predni l", "zadni svetlo", "brzdove svetlo", "spz", "karoserie", "motor", "zbran", "vez", "zbytek", "levy predni", "levy prostredni", "levy zadni", "pravy predni", "pravy prostredni", "pravy zadni", "clan", "clan_sign", "zasleh", "P svetlo", "L svetlo", "palivo" }; skeletonName="Car"; class Animations { class damageHide { type="hide"; source="damage"; selection="damageHide"; }; class IndicatorSpeed { animPeriod=0; type="rotation"; source="speed"; selection="ukaz_rychlo"; axis="osa_rychlo"; memory=0; minValue=0.000000; maxValue=16.670000; angle0=0.000000; angle1=2.879793; }; class IndicatorSpeed2 { type="rotation"; source="speed"; selection="ukaz_rychlo2"; axis="osa_rychlo2"; memory="false"; animPeriod=0; minValue=0; maxValue=16.670000; angle0=0; angle1="rad -240"; }; class IndicatorRPM { animPeriod=0; type="rotation"; source="rpm"; selection="ukaz_rpm"; axis="osa_rpm"; memory=0; minValue=0.000000; maxValue=1.000000; angle0=0.000000; angle1=2.967060; }; class DrivingWheel { type="rotation"; source="drivingWheel"; selection="volant"; begin="osaVolantZac"; end="osaVolantKon"; memory="false"; animPeriod=0; minValue=-1; maxValue=1; angle0=-8; angle1=8; }; class TurnFrontWheelR { type="rotationY"; source="drivingWheel"; selection="pravy predni zatoc"; axis="pravy predni"; memory="false"; animPeriod=0; sourceAddress="loop"; minValue="rad -180"; maxValue="rad +180"; angle0="rad +90"; angle1="rad -90"; }; class TurnFrontWheelL: TurnFrontWheelR { selection="levy predni zatoc"; axis="levy predni"; }; class TurnFrontWheelR2: TurnFrontWheelR { selection="pravy dalsi zatoc "; axis="pravy dalsi"; }; class TurnFrontWheelL2: TurnFrontWheelR { selection="levy dalsi zatoc "; axis="levy dalsi"; }; class FrontWheelR { type="rotationX"; source="wheel"; selection="pravy predni"; axis=""; memory="true"; animPeriod=0; sourceAddress="loop"; minValue=0; maxValue=1; angle0=0; angle1="rad -360"; }; class FrontWheel2R: FrontWheelR { selection="pravy dalsi"; }; class BackWheelR: FrontWheelR { selection="pravy zadni"; }; class BackWheel2R: FrontWheelR { selection="pravy prostredni"; }; class FrontWheelL: FrontWheelR { selection="levy predni"; }; class FrontWheel2L: FrontWheelR { selection="levy dalsi"; }; class BackWheelL: FrontWheelR { selection="levy zadni"; }; class BackWheel2L: FrontWheelR { selection="levy prostredni"; }; class FrontWheelDamperR { type="translationY"; source="damper"; selection="pravy predni tlumic"; axis=""; animPeriod=0; minValue=-1000; maxValue=1000; }; class FrontWheelDamper2R: FrontWheelDamperR { selection="pravy dalsi tlumic"; }; class BackWheelDamperR: FrontWheelDamperR { selection="pravy zadni tlumic"; }; class BackWheelDamper2R: FrontWheelDamperR { selection="pravy prostredni tlumic"; }; class FrontWheelDamperL: FrontWheelDamperR { selection="levy predni tlumic"; }; class FrontWheelDamper2L: FrontWheelDamperR { selection="levy dalsi tlumic"; }; class BackWheelDamperL: FrontWheelDamperR { selection="levy zadni tlumic"; }; class BackWheelDamper2L: FrontWheelDamperR { selection="levy prostredni tlumic"; }; class damageVez: damageHide { selection="damageVez"; }; class damageHlaven: damageHide { selection="damageHlaven"; }; }; }; class MyModelName: Car {}; }; Obviously, replace "MyModelName", with the filename for your model (ie, if your model is called "Jeep.p3d" the last line would be "class Jeep: Car {};"). I honestly can't admit to actually understanding any of that code, and I'm pretty much convinced model.cfg files are complete witchcraft. So I'd recommend downloading the sample models (here or here), which include complete model.cfg files for you to look over. -------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Jan 22 2014, 12:42
Post
#3
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
Thanks for this fast response!
I will try it again and keep you up-to-date. |
|
|
Feb 26 2014, 16:36
Post
#4
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
I tried so many version, but it doesn' work :/
can anyone help me please? aney ______________________________________ filename: sample_racer P3D-name: racer Here are the config.cpp + model.cfg: config.cpp: CODE class CfgPatches { class sample_racer { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class myRacer : Car { displayName ="racer"; model = \sample_racer\racer.p3d; crew ="Civilian2"; scope = public; }; }; model.cpp: CODE class Rotation;
class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class VBS2_Vehicle : Default{}; class VBS2_Vehicle_Wheeled : VBS2_Vehicle { skeletonInherit = "VBS2_Vehicle"; skeletonBones[] = { "drivewheel","" }; }; class VBS2_CarSkeleton : VBS2_Vehicle_Wheeled { skeletonInherit = "VBS2_Vehicle_Wheeled"; skeletonBones[] = { "wheel_1_1_damper","", "wheel_1_1_steering","wheel_1_1_damper", "wheel_1_1","wheel_1_1_steering", "wheel_1_2_damper","", "wheel_1_2_steering","wheel_1_2_damper", "wheel_1_2","wheel_1_2_steering", "wheel_2_1_damper","", "wheel_2_1","wheel_2_1_damper", "wheel_2_2_damper","", "wheel_2_2","wheel_2_2_damper" }; }; class VBS2_CarSkeleton_4D : VBS2_CarSkeleton { skeletonInherit = "VBS2_CarSkeleton"; skeletonBones[] = {}; }; class racerSkeleton : VBS2_CarSkeleton_4D { skeletonInherit = "VBS2_CarSkeleton_4D"; skeletonBones[] = {}; }; }; class CfgModels { class Default { sectionsInherit = ""; sections[] = {}; skeletonName = ""; }; class VBS2_Vehicle : Default{}; class VBS2_Vehicle_Wheeled : VBS2_Vehicle { sectionsInherit = "VBS2_Vehicle"; skeletonName = "VBS2_Vehicle_Wheeled"; class Animations { class DrivingWheel : Rotation { source = "drivingWheel"; selection = "drivewheel"; axis = "drivewheel_axis"; minValue = -1; maxValue = 1; angle0 = 4; angle1 = -4; }; }; }; class VBS2_Car : VBS2_Vehicle_Wheeled { sectionsInherit = "VBS2_Vehicle_Wheeled"; skeletonName = "VBS2_CarSkeleton"; class Animations:Animations { class Steering_1_1 { type = "rotationY"; source = "drivingWheel"; selection = "wheel_1_1_steering"; axis = "wheel_1_1_steering_axis"; memory = 1; minValue = "rad -90"; maxValue = "rad +90"; angle0 = 1.047198; angle1 = -1.047198; }; class Steering_1_2: Steering_1_1 { selection = "wheel_1_2_steering"; axis = "wheel_1_2_steering_axis"; angle0 = 1.047198; angle1 = -1.047198; }; class Wheel_1_1 { type = "rotationX"; source = "wheel"; selection = "wheel_1_1"; axis = ""; memory = 1; sourceAddress = "loop"; minValue = 0; maxValue = 1; angle0 = 0; angle1 = "rad -360"; }; class Wheel_1_2: Wheel_1_1 { selection = "wheel_1_2"; }; class Wheel_2_1: Wheel_1_1 { selection = "wheel_2_1"; }; class Wheel_2_2: Wheel_1_1 { selection = "wheel_2_2"; }; class Wheel_1_1_Damper { type = "translationY"; source = "damper"; selection = "wheel_1_1_damper"; axis = ""; minValue = -1; maxValue = 1; memory = 1; }; class Wheel_1_2_Damper: Wheel_1_1_Damper { selection = "wheel_1_2_damper"; }; class Wheel_2_1_Damper: Wheel_1_1_Damper { selection = "wheel_2_1_damper"; }; class Wheel_2_2_Damper: Wheel_1_1_Damper { selection = "wheel_2_2_damper"; }; }; }; class VBS2_Car_4D : VBS2_Car { sectionsInherit = "VBS2_Car"; skeletonName = "VBS2_CarSkeleton_4D"; sections[] = {}; }; class racer : VBS2_Car_4D { sectionsInherit = "VBS2_Car_4D"; skeletonName = "racerSkeleton"; sections[] = {}; }; }; |
|
|
Feb 26 2014, 16:46
Post
#5
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
... i forgot to say, that with this code my model isn't available ingame.
So i think the main problem is in the config!? |
|
|
Feb 26 2014, 16:48
Post
#6
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
The VBS model.cfg uses English names for selections - assuming you've followed Brrseb's tutorial, your model probably has them in Czech. You'd either need to change the selections in your p3d or model.cfg so the names match.
-------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Feb 26 2014, 16:54
Post
#7
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
I made a completely new model (p3d) with english named selections.
Maybe the base classes are wrong because it doesn't appear in game? |
|
|
Feb 26 2014, 17:38
Post
#8
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
Sorry, I need to learn to read what people are saying before trying to answer questions they aren't asking
It's not showing up the editor because the engine doesn't recognise this line: CODE scope = public; You can either just use CODE scope = 2; or put these basic definitions at the start of your config (which, IMHO, you should probably do regardless) CODE //Basic Definitions
#define true 1 #define false 0 #define VSoft 0 #define VArmor 1 #define VAir 2 #define private 0 #define protected 1 #define public 2 #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 ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 #define DefaultManWeapons Throw,Put -------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Feb 27 2014, 13:51
Post
#9
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
Thank you so much - my car is now in the list again!
After pbo packing the log file says <model = "P:\ ... \tempTextures.p3d"> I've deleted all textures and applied them again. Do you know the reason for this problem? |
|
|
Feb 27 2014, 13:59
Post
#10
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
That's completely normal, it's just what the log file says when binpbo starts binarizing a model.
-------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Feb 27 2014, 14:11
Post
#11
|
|
New Member Group: Members Posts: 9 Joined: 21-January 14 Member No.: 10,392 |
But when I put the pbo in the addon folder and start this error pops up:
cannot open object - \sample_racer\racer.p3d EDIT: all right! this was a problem with the model path. so, it's all fine. my drivingwheel turns, textures are ok, mass ok, etc. ... but back again to my first problem: when I'm driving the car I'm sitting on the ground (below the car) that makes me so mad :/ This post has been edited by aney: Feb 27 2014, 14:31 |
|
|
Feb 27 2014, 14:57
Post
#12
|
|
Gee, I wish we had one of them doomsday machines. Group: Moderators Posts: 2,037 Joined: 13-November 06 From: Wales Member No.: 155 |
Try adding
CODE driverAction = UAZ_Driver; To your config. -------------------- The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you Site Issues Thread - Complain about site issues here. We might even fix them! Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly". QUOTE(Major Mike Shearer) We can categorically state that we have not released man-eating badgers into the area. QUOTE(Brace Belden) A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one. |
|
|
Lo-Fi Version | Time is now: 19th April 2024 - 03:26 |