sprags 0 Posted January 1, 2008 Hi guys. sorry if this has been posted before but I have searched high and low on all the Ofp/Arma forums i know off and am trying to find out if it is possible to add in the Fuel gauge to the hud of land vehicles. I am have looked through the MFD and Hud sections on the Biki,and tried adding in the simple bone and MFD classes,but it seems to give a MFD.scope not found error and doesn't work. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class IC_Armour { units[] = {"ic_m1a1"}; weapons[] = {}; requiredVersion = 1.08; requiredAddons[] = {"CAWeapons", "CATracked"}; }; }; class CfgVehicleClasses { class IC_tracked { displayName = "IC_Armour"; }; }; class CfgVehicles { /*extern*/ class M1Abrams; class ic_m1a1: M1Abrams { vehicleClass="IC_tracked"; side = 2; model="\ca\Tracked\M1_abrams"; displayName = "M1A1"; fuelcapacity= 1; }; class MFD { class Bones { class Linear { type = linear; source = fuel; min = 0; //Min value this bone can display max = 1; //Max value this bone can display minPos[] = {0.5,0.2}; maxPos[] = {0.5,0.5}; }; }; }; }; }; If its possible and anyone could shed some light,that would be most appreciated. Thanks Sprags Share this post Link to post Share on other sites
Guest RKSL-Rock Posted January 2, 2008 You are trying to use the OFP method of animations to work in ArmA and it wont ever work. All Animations need to be defined in a model.cfg file. In ArmA you need these files: <yourmodel>.p3d config.cpp model.cfg The first two are obvious. Â The 3rd is the file that is incorporated into the P3D file on binarisation or loading into the game engine. Â Its a plain text file just like the config.cpp and includes all the animation definitions and "bones" for the model. Have a look at this and if you are still having a problem, reply here and I'll see if i can walk you through it. http://community.bistudio.com/wiki/ArmA:_How_to_animate_a_model Share this post Link to post Share on other sites
USSRsniper 0 Posted January 2, 2008 You are trying to use the OFP method of animations to work in ArmA and it wont ever work.All Animations need to be defined in a model.cfg file. In ArmA you need these files: <yourmodel>.p3d config.cpp model.cfg The first two are obvious. Â The 3rd is the file that is incorporated into the P3D file on binarisation or loading into the game engine. Â Its a plain text file just like the config.cpp and includes all the animation definitions and "bones" for the model. Have a look at this and if you are still having a problem, reply here and I'll see if i can walk you through it. http://community.bistudio.com/wiki/ArmA:_How_to_animate_a_model You can have model.cfg in config, it does not have to be separate file. Share this post Link to post Share on other sites
Guest RKSL-Rock Posted January 2, 2008 You are trying to use the OFP method of animations to work in ArmA and it wont ever work.All Animations need to be defined in a model.cfg file. In ArmA you need these files: <yourmodel>.p3d config.cpp model.cfg The first two are obvious. Â The 3rd is the file that is incorporated into the P3D file on binarisation or loading into the game engine. Â Its a plain text file just like the config.cpp and includes all the animation definitions and "bones" for the model. Have a look at this and if you are still having a problem, reply here and I'll see if i can walk you through it. http://community.bistudio.com/wiki/ArmA:_How_to_animate_a_model You can have model.cfg in config, it does not have to be separate file. For it to work properly after being binarised it does. Share this post Link to post Share on other sites
RN Malboeuf 12 Posted January 2, 2008 USSRsniper RockofSL is right. +if it's part of cpp you can't preview anims in buldozer I can't really get what this tooic is about - whether its on vehicle animations or MFD ones (i guess it's available only for air units) Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 2, 2008 For it to work properly after being binarised it does. Huh? I keep hearing this but my Binz'ed models seem to work fine .......... what doesnt work Rock ? @sprags Do you mean the little bar (with armour value) that normally sits at the top left for most vehicles ? Or if you don't, do you mean a true HUD (landvehicle ?! ) If so, maybe you should check out the A10's config and model. - The model BI supplied as a sample - The config can be de-PBO from A10 pbo file. The config has a section that starts like; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class MFD { class AirplaneHUD { topLeft = "HUD LH"; topRight = "HUD PH"; bottomLeft = "HUD LD"; borderLeft = 0; borderRight = 0; borderTop = 0; borderBottom = 0.100000; color[] = {0,1,0,0.100000 }; class Pos10Vector { type = "vector"; pos0[] = {0.500000,0.320000 }; pos10[] = {"0.5+0.57","0.32+0.62" }; }; class Bones { class AGLMove1 { type = "linear"; source = "altitudeAGL"; min = 0; max = 100; minPos[] = {0.850000,0.300000 }; maxPos[] = {0.850000,0.300000 }; }; class AGLMove2 { type = "fixed"; pos[] = {0.050000,0.800000 }; }; class ASLMove1 { type = "linear"; source = "altitudeASL"; min = 0; max = 500; minPos[] = {0.100000,0.100000 }; maxPos[] = {0.100000,0.800000 }; }; class ASLMove2 { type = "fixed"; pos[] = {0.100000,0.800000 }; }; class VertSpeed { type = "linear"; source = "vSpeed"; min = -25; max = 25; minPos[] = {0,-0.400000 }; maxPos[] = {0,0.400000 }; }; Share this post Link to post Share on other sites
USSRsniper 0 Posted January 2, 2008 USSRsniperRockofSL is right. +if it's part of cpp you can't preview anims in buldozer I can't really get what this tooic is about - whether its on vehicle animations or MFD ones (i guess it's available only for air units) But you can preview anims in game, quote from BIS wiki... "Another option is to add both classes (cfgSkeletons and cfgModels) to the config.cpp file of your addon. This way, you do not need to binarize your addon, so it's a perfect way to test it. However, the first method is prefered and should always be used when releasing your addon. " Share this post Link to post Share on other sites
sprags 0 Posted January 2, 2008 Exactly what you Mean Gnat Just the Linear bar which would appear in the Top left Hud. sorry if i confused you guys with actually wanting to add in an animated fuel gauge to the model. Anyways,i did take a quick look at adding in sections of the MFD config and AirplaneHud from the Air.pbo config.cpp,but had no luck. I will take another look,and see if i get anywhere. Have any of you guys actually managed to get it to work? Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 2, 2008 You mean these ....... Wish I knew too ..... Share this post Link to post Share on other sites