Results 1 to 10 of 10

Thread: problem with turret in helicopter

  1. #1

    problem with turret in helicopter

    i have problem, asked few people on BI, maybe will start topic on config editing

    following problem happens :

    - when helicopter (gunship version) is "remodel of Mi24" all is okay

    i mean :

    vil_w3_pl : mi24_d {
    model = model of W3 Gluszec
    displayname W-3 Pl
    crew = Polish pilot...
    };

    all works fine , but.. it uses Mi24 weapons (YakB) instead of my own NSV

    but when i try own turret definion (a lot of problems of class inheritance)

    bullets go straight

    bullets do not follow gunner view point

    body of gun rotates

    sensor rotates

    optic rotates

    but bullets go straight like there was no movement at all

    even if i use BIS weapon YakB - problem is because of turret problems

    model is good - all selections are applied properly - because Mi24D class shows it

    it not works ONLY when i define my own turret

    what is most strange - turret turns, but bullets do not obey turret :/

    Spoiler:


    when i tried other inheritances of turret i get :
    http://img241.imageshack.us/img241/1427/octt.jpg

    so i tried 3 days and i gave up now

    i cannot understand what is wrong

    why bullets follow sight point when model is using Mi24 class , but not follows when own turret definition is made

  2. #2
    Second Lieutenant vilas's Avatar
    Join Date
    Oct 13 2004
    Location
    POLAND
    Posts
    4,532
    Author of the Thread
    up, cause important for me :|
    probably it is a matter of "inheritance order" of "turret {}; or turret; newturret or mainturret" etc.

    i am really surprised, cause i made a lot of vehicles with turrets (mostly tanks, apc) and this gunship helicopter is really pain in the... i will have to make it "fixed" or "overpowered" if use Mi24 armament :/

  3. #3
    why do you not derive your class from the Mi24 then? Deriving from top level classes like Helicopter can be quite a hard task.

    PHP Code:
    class mi24_d
    {
        class 
    Turrets
        
    {
            class 
    MainTurret;
        };
        class 
    NewTurret;
    };
    class 
    VILAS_W3gunship_helicopter mi24d
    {
        ...
        class 
    Turrets Turrets
        
    {
            class 
    MainTurret MainTurret
            
    {
                ...
            };
        };
        ...
    }; 
    Last edited by Soul_Assassin; Nov 19 2010 at 19:15.

  4. #4
    Second Lieutenant vilas's Avatar
    Join Date
    Oct 13 2004
    Location
    POLAND
    Posts
    4,532
    Author of the Thread
    it not works too

    bullets do follow aim (turret, rifle barrel, sight) only when class is directly inherited without defining own turret (which is must to arm it other way than Mi24 D)

    not works, i tried :

    Spoiler:


    bullets go straight

  5. #5
    try just this then:

    PHP Code:
    class mi24_d
    {
        class 
    Turrets
        
    {
            class 
    MainTurret;
        };
        class 
    NewTurret;
    };
    class 
    VILAS_W3gunship_helicopter mi24_d
    {
        
    rotorBig "velkavrtule";
        
    rotorBigBlend "velkavrtule_blur";
        
    rotorSmall "malavrtule";
        
    rotorSmallBlend "malavrtule_blur";
        
    selectionHRotorStill "velkavrtule_staticka";
        
    selectionHRotorMove "velkavrtule_blur";
        
    selectionVRotorStill "malavrtule_staticka";
        
    selectionVRotorMove "malavrtule_blur";
        class 
    AnimationSource {};
        class 
    UserActions {};
        
    scope 0;
        
    SIDE=1;
        
    driverAction "Mi8_Pilot";
        
    cargoAction[] = {"Mi8_Cargo""Mi17_Cargo02"};

        
    radarType=4;
        
    LockDetectionSystem=8;
        
    IncommingMisslieDetectionSystem=16;

        
    threat[]={0.8,1,0.6};
        
    armor=30;
        
    damageResistance=0.00138;

        
    gunnerUsesPilotView=0;
        
    cargoIsCoDriver[]={0,0};

        
    memoryPointsGetInCargo[]={"pos cargo"};
        
    memoryPointsGetInCargoDir[]={"pos cargo dir"};

        class 
    Turrets Turrets
        
    {
            class 
    MainTurret MainTurret
            
    {
                
    weapons[] = {"vil_wkmb""AT9Launcher""80mmLauncher"};
                
    magazines[] = {"vil_w3pl_mag""4Rnd_AT9_Mi24P""40Rnd_80mm"};
            };
        };

    }; 


    class 
    VIL_PL_W3_PL2 VILAS_W3gunship_helicopter 
    {
        
    scope 2;
        
    model "\vilas_npl\vil_w3_pl";
        
    displayName PZL W-3PL(W);
        
    irScanRangeMin 0;
        
    irScanRangeMax 1000;
        
    nightVision true;
        
    vehicleClass "VIL_polskie_vehair";
        
    faction "VIL_NWP_Army";
        
    crew "VIL_SOLDIER_NWP_PLT";

    }; 
    i.e. just redefine weapons and magazines in the class, nothing else. I suspect that ur also getting some errors in the rpt, concerning the turret.

  6. #6
    Second Lieutenant vilas's Avatar
    Join Date
    Oct 13 2004
    Location
    POLAND
    Posts
    4,532
    Author of the Thread
    of course i did it , but not works

    i ll send you on PM link to MLOD and you can check yourself that it not works , something is wrong and it require inherit from Helicopter class, RKLS also tries solve it , but not solved yet

  7. #7
    Suggest;
    PHP Code:
    class mi24_d 

        class 
    Turrets;
        class 
    NewTurret;
    class 
    AnimationSources;
    }; 
    class 
    VILAS_W3gunship_helicopter mi24_d 

    ......
    ......
    ......
        class 
    Turrets 
        

            class 
    MainTurret NewTurret
            
    {
            
    body "mainturret";
            
    gun "maingun";
            
    animationSourceBody "mainturret";
            
    animationSourceGun "maingun";
            
    gunBeg "S_start";
            
    gunEnd "S_end"
                .......
                ....... 
            }; 
        }; 

    }; 
    Change "body", "gun", "S_Start", "AnimationSourceBody" etc to whatever you use.
    Last edited by [APS]Gnat; Nov 23 2010 at 09:06.

  8. #8
    Second Lieutenant vilas's Avatar
    Join Date
    Oct 13 2004
    Location
    POLAND
    Posts
    4,532
    Author of the Thread
    i tried almost all
    maybe i will send you MLOD too and you will test yourself if it works

    as i remember i was trying such configuration and had the same issue (when defining any turret)
    you will see that model should be okay (memory points)

    PM

  9. #9
    PM backed.
    Seems fixed.
    Main changes I think are;

    Model.cfg
    PHP Code:
                class MainTurret
                
    {
                    
    type="rotationY";
                    
    source="mainTurret";
                    
    selection="OtocVez";
                    
    axis="OsaVeze";
                    
    animPeriod=0;
                    
    minValue="rad -360";
                    
    maxValue="rad +360";
                    
    angle0="rad -360";
                    
    angle1="rad +360";
                };
                class 
    MainGunMainTurret
                
    {
                    
    type="rotationX";
                    
    source="mainGun";
                    
    selection="OtocHlaven";
                    
    axis="OsaHlavne";
                }; 
    Config.cpp
    PHP Code:
    class CfgVehicles
    {
        class 
    Air;
        class 
    Helicopter Air
        
    {
            class 
    NewTurret;
            class 
    AnimationSources;
            class 
    ViewPilot;
            class 
    Turrets;
            class 
    MainTurret;
        };
        
    class 
    VILAS_W3gunship_helicopter Helicopter
    {
    ....
    .... 
    and
    PHP Code:
            class Turrets {
                class 
    MainTurret NewTurret {
                    
    startEngine 0;
                    
    outGunnerMayFire 1;
                    
    commanding = -1;
                    
    primary 1;
                    
    gunBeg "usti_hlavne";
                    
    gunEnd "konec_hlavne";
                    
    memoryPointGun "kulas";
                    
    memoryPointGunnerOptics "gunnerview";
    ....
    .... 

  10. #10
    Second Lieutenant vilas's Avatar
    Join Date
    Oct 13 2004
    Location
    POLAND
    Posts
    4,532
    Author of the Thread
    yes, thanx, it works

    class Helicopter : Air
    {
    class NewTurret;
    class AnimationSources; <<<<<<<< probably this was whole issue
    class ViewPilot;
    class Turrets;
    class MainTurret;
    };

    i even not changed model (binarising it again) and it WORK
    so model wouldn't even get changed, only this inheritance changed and it works

    so seems that issue was inheritance of main class helicopter ?

    cause i applied this and it started to work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •