Jump to content
Sign in to follow this  
BeastHunter

Strange Vehicle Behaviour

Recommended Posts

Hello,

 

I am currently working on a mod. For this mod I wanted to add some already existing vehicles into a new faction. Therefore I used the ALiVE ORBAT tool, but I don't know if it's that important. After adding them and packing my mod into a .pbo file, I loaded the mod and its dependencies and placed down everything in 3den Editor. But something strange happened:

(I screenshottet the bug and the error message)

7OaVJHfU.jpg

 

 

20200527102249-1.jpg

 

20200527102303-1.jpg

 

The cannons and the plane were "shooting", the muzzle flash was shown like it was a part of the object, and I wasn't able to shoot anymore!

 

20200527112025-1.jpg

 

20200527112040-1.jpg

 

I deleted both vehicles from the files and added a stug III. There was no muzzle flash bug, but the errors above and only the drivers seat was avaiable, the gunner seat was not accessable.

 

Can someone help me?

Share this post


Link to post
Share on other sites

It looks like broken inheritance. Hard to tell more without looking at the code itself.

Share this post


Link to post
Share on other sites

class CBA_Extended_EventHandlers_base;

class CfgVehicles {

    class LIB_StuG_III_G;
    class LIB_StuG_III_G_OCimport_01 : LIB_StuG_III_G { scope = 0; class EventHandlers; class Turrets; };
    class LIB_StuG_III_G_OCimport_02 : LIB_StuG_III_G_OCimport_01 { 
        class EventHandlers; 
        class Turrets : Turrets {
            class MainTurret;
        };
    };


    class B_BHUN_STUG_III_01 : LIB_StuG_III_G_OCimport_02 {
        author = "AoFA | Schraxt";
        scope = 2;
        scopeCurator = 2;
        displayName = "STUG III";
        side = 1;
        faction = "B_HUN";
        crew = "B_HUN_Tanker_01";

        class Turrets : Turrets {
            class MainTurret : MainTurret { gunnerType = "B_HUN_Tanker_Headphones_01"; };
        };

        class EventHandlers : EventHandlers {
            class CBA_Extended_EventHandlers : CBA_Extended_EventHandlers_base {};

            class ALiVE_orbatCreator {
                init = "if (local (_this select 0)) then {_onSpawn = {sleep 0.3; _unit = _this select 0;_unit setObjectTextureGlobal [0,'\WW2\Assets_t\Vehicles\Tanks_t\IF_StuG_III_G\Main_w_co.paa'];_unit setObjectTextureGlobal [1,'\WW2\Assets_t\Vehicles\Tanks_t\IF_StuG_III_G\Misc_w_co.paa'];_unit setObjectTextureGlobal [2,'\WW2\Assets_t\Vehicles\Tanks_t\IF_StuG_III_G\Wheels_w_co.paa'];};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
            };

        };

        // custom attributes (do not delete)
        ALiVE_orbatCreator_owned = 1;
        ALiVE_orbatCreator_texture = "winter";

    };

};

 

 

 

 

 

 

 

 

That's the code. I tryed to add it as an own .pbo, but there was the same mistake. It's the tank's code.

Share this post


Link to post
Share on other sites

Is it whole code? I don't see CfgPatches for instance.


 

        class Turrets : Turrets {
            class MainTurret;
        };

You should do external class reference in  Tank_F class or anything with scope = 1. Class Turrets is special kind of bread which have bit different inheritance

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  

×