???
Математика на уровне МГУ

Показано с 1 по 25 из 789

Тема: Вопросы.

Комбинированный просмотр

Предыдущее сообщение Предыдущее сообщение   Следующее сообщение Следующее сообщение
  1. #1
    Борец с силами Стима Аватар для BigREPA
    Регистрация
    22.04.2004
    Адрес
    Питер
    Возраст
    53
    Сообщений
    1,368
    Записей в дневнике
    2
    Images
    3

    Re: Вопросы.

    Не увидел в скрипте "Aircraft.Bf-109E-1" - добавил

    Запустится на #2 в 19-00
    Развожу репки и мейн-кунов
    Ищу человека территориально из Крымска, Новороссийска или Краснодара, с "приличным" интернетом, просьба "не пыльная", но очень нужно, буду благодарен.
    Стучать в личку, в мыло repka@inbox.ru или skype repka-78rus

  2. #2

    Re: Вопросы.

    How can one make an Ai aircraft say something to the group, like in using a SayToGroup with custom messages (others than the ones from IL2 CoD) like function, please?

    Refuel, repair, rearm (set actor's aircraft's fuel, ammo, health levels)?

    Do damage to a random part of a plane (not using the limited Switch construction, which only allows damage to the parts listed in it, therefore a limited number)?

  3. #3
    Старший Офицер Форума
    Регистрация
    15.02.2002
    Адрес
    Moscow
    Возраст
    47
    Сообщений
    6,905
    Images
    51

    Re: Вопросы.

    Цитата Сообщение от BigREPA Посмотреть сообщение
    Не увидел в скрипте "Aircraft.Bf-109E-1" - добавил

    Запустится на #2 в 19-00
    иконки наверное имеет смысл включить, ну или завтра "разведсводку" добавлю.

    Цитата Сообщение от adonys Посмотреть сообщение
    How can one make an Ai aircraft say something to the group, like in using a SayToGroup with custom messages (others than the ones from IL2 CoD) like function, please?
    Hi, adonys. You can not use SayToGroup with custom messages - only those wich is already in game - with own sound.

    Цитата Сообщение от adonys Посмотреть сообщение
    Refuel, repair, rearm (set actor's aircraft's fuel, ammo, health levels)?
    real refuel-rearming procedure takes at least 30 minutes, and our chief aircraft programmer said that it is more real to create new plane after landing then RRR it ...

    Цитата Сообщение от adonys Посмотреть сообщение
    Do damage to a random part of a plane (not using the limited Switch construction, which only allows damage to the parts listed in it, therefore a limited number)?
    i'll try answer tomorrow
    Don't happy, be worry

  4. #4

    Re: Вопросы.

    Цитата Сообщение от naryv Посмотреть сообщение
    Цитата Сообщение от adonys Посмотреть сообщение
    Do damage to a random part of a plane (not using the limited Switch construction, which only allows damage to the parts listed in it, therefore a limited number)?
    i'll try answer tomorrow
    I've made something like this:

    Код:
    // Script that triggered an accidental damage to the player plane
    // Autor: adonys
    // version: 1.1
    
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    
    public class Mission : maddox.game.AMission
    {
        AiAircraft PlayerPlane;
        
        int PlanePartsNr = 117;
        
        private string[] PlanePartsList = new string[] 
        {   "ElecGeneratorFailure",
            "ElecBatteryFailure",
            "ElecPrimaryFailure",
            "ElecSecondaryFailure",
            "ElecMasterCompassFailure",
            "ElecWeaponryFailure",
            "ElecPriNavigationFailure",
            "ElecSecNavigationFailure",
            "ElecTransceiverFailure",
            "ElecIlluminationFailure",
            "HydraulicsPumpFailure",
            "HydraulicsPrimaryHosePerforated",
            "HydraulicsPistonOpened",
            "HydraulicsEmergencyFailure",
            "HydraulicsTankPerforated",
            "PneumaticsCompressorFailure",
            "PneumaticsPrimaryContainerPerforated",
            "PneumaticsSecondaryContainerPerforated",
            "PneumaticsPrimaryHosePerforated",
            "PneumaticsSecondaryHosePerforated",
            "ControlsGenericKickdown",
            "ControlsElevatorDisabled",
            "ControlsAileronsDisabled",
            "ControlsRudderDisabled",
            "LandingFlapsPistonFailure1",
            "LandingFlapsPistonFailure2",
            "LandingFlapsKinematicFailure1",
            "LandingFlapsKinematicFailure2",
            "LandingFlapsDriveFailure",
            "LandingFlapsHosePerforated",
            "AirbrakeHosePerforated",
            "AirbrakeDriveFailure",
            "AirbrakePistonFailure",
            "WheelBrakesFailureL",
            "WheelBrakesFailureR",
            "WheelBrakesTotalFailure",
            "WheelBrakesHosePerforated",
            "UndercarriageShockFailureL",
            "UndercarriageShockFailureR",
            "UndercarriageShockFailureC",
            "UndercarriageUpLockFailureL",
            "UndercarriageUpLockFailureR",
            "UndercarriageUpLockFailureC",
            "UndercarriageDownLockFailureL",
            "UndercarriageDownLockFailureR",
            "UndercarriageDownLockFailureC",
            "UndercarriageKinematicFailureL",
            "UndercarriageKinematicFailureR",
            "UndercarriageKinematicFailureC",
            "UndercarriageHosePerforated",
            "UndercarriageDriveDamaged",
            "Eng0TotalFailure",
            "Eng0TotalSeizure",
            "Eng0IntakeBurnt",
            "Eng0CompressorFailure",
            "Eng0CompressorGovernorFailure",
            "Eng0CompressorSeizure",
            "Eng0IntercoolerBurnt",
            "Eng0CarbFailure",
            "Eng0CarbControlsFailure",
            "Eng0FuelLinePerforated",
            "Eng0FuelPumpFailure",
            "Eng0FuelSecondariesFire",
            "Eng0Magneto0Failure",
            "Eng0Magneto1Failure",
            "Eng0OilPumpFailure",
            "Eng0OilRadiatorPerforated",
            "Eng0OilLineBroken",
            "Eng0OilGasketLeak",
            "Eng0OilSecondariesFire",
            "Eng0OilSecondariesExtinguished",
            "Eng0OilTankPerforated",
            "Eng0WaterPumpFailure",
            "Eng0WaterRadiatorPerforated",
            "Eng0WaterLineBroken",
            "Eng0WaterTankPerforated",
            "Eng0WaterJacketBroken",
            "Eng0CylinderHeadFire",
            "Eng0CylinderHeadExtinguished",
            "Eng0ExhaustHeadFailure",
            "Eng0GovernorFailure",
            "Eng0GovernorSeizure",
            "Eng0ThrottleControlBroken",
            "Eng0PropControlBroken",
            "Eng0TretiaryControlBroken",
            "Eng0PropBlade0Broken",
            "Eng0PropBlade1Broken",
            "Eng0PropBlade2Broken",
            "Eng0PropBlade3Broken",
            "Eng0Plug00Failure",
            "FuelTank0TinyLeak",
            "FuelTank0SmallLeak",
            "FuelTank0LargeLeak",
            "FuelTank0Fire",
            "FuelTank0Exploded",
            "FuelTank0HosePerforated",
            "FuelTank0PumpFailure",
            "Machinegun00Failure",
            "Machinegun00BeltBroken",
            "Machinegun00Jammed",
            "Machinegun00Charged",
            "Machinegun00LineDamaged",
            "CockpitDamageFlag00",
            "CockpitDamageFlag01",
            "CockpitDamageFlag02",
            "CockpitDamageFlag03",
            "CockpitDamageFlag04",
            "CockpitDamageFlag05",
            "CockpitDamageFlag06",
            "CockpitDamageFlag07",
            "CockpitDamageFlag08",
            "CockpitDamageFlag09",
            "CockpitDamageFlag10",
            "CockpitDamageFlag11",
            "CockpitDamageFlag12",
            "CockpitDamageFlag13",
            "CockpitDamageFlag14",
        };
    
        private string[] PlanePartsListText = new string[] 
        {   "ElecGeneratorFailure",
            "ElecBatteryFailure",
            "ElecPrimaryFailure",
            "ElecSecondaryFailure",
            "ElecMasterCompassFailure",
            "ElecWeaponryFailure",
            "ElecPriNavigationFailure",
            "ElecSecNavigationFailure",
            "ElecTransceiverFailure",
            "ElecIlluminationFailure",
            "Hydraulics Pump failure",
            "HydraulicsPrimaryHosePerforated",
            "HydraulicsPistonOpened",
            "HydraulicsEmergencyFailure",
            "HydraulicsTankPerforated",
            "PneumaticsCompressorFailure",
            "PneumaticsPrimaryContainerPerforated",
            "PneumaticsSecondaryContainerPerforated",
            "PneumaticsPrimaryHosePerforated",
            "PneumaticsSecondaryHosePerforated",
            "ControlsGenericKickdown",
            "Elevator disabled",
            "Ailerons disabled",
            "Rudder disabled",
            "LandingFlapsPistonFailure1",
            "LandingFlapsPistonFailure2",
            "LandingFlapsKinematicFailure1",
            "LandingFlapsKinematicFailure2",
            "LandingFlapsDriveFailure",
            "LandingFlapsHosePerforated",
            "AirbrakeHosePerforated",
            "AirbrakeDriveFailure",
            "AirbrakePistonFailure",
            "WheelBrakesFailureL",
            "WheelBrakesFailureR",
            "WheelBrakesTotalFailure",
            "WheelBrakesHosePerforated",
            "UndercarriageShockFailureL",
            "UndercarriageShockFailureR",
            "UndercarriageShockFailureC",
            "UndercarriageUpLockFailureL",
            "UndercarriageUpLockFailureR",
            "UndercarriageUpLockFailureC",
            "Undercarriage Left down-lock mechanism failure",
            "Undercarriage Right down-lock mechanism failure",
            "Undercarriage Central down-lock mechanism failure",
            "UndercarriageKinematicFailureL",
            "UndercarriageKinematicFailureR",
            "UndercarriageKinematicFailureC",
            "UndercarriageHosePerforated",
            "UndercarriageDriveDamaged",
            "Engine Total failure",
            "Eng0TotalSeizure",
            "Eng0IntakeBurnt",
            "Eng0CompressorFailure",
            "Eng0CompressorGovernorFailure",
            "Eng0CompressorSeizure",
            "Eng0IntercoolerBurnt",
            "Eng0CarbFailure",
            "Eng0CarbControlsFailure",
            "Eng0FuelLinePerforated",
            "Eng0FuelPumpFailure",
            "Eng0FuelSecondariesFire",
            "Eng0Magneto0Failure",
            "Eng0Magneto1Failure",
            "Eng0OilPumpFailure",
            "Eng0OilRadiatorPerforated",
            "Eng0OilLineBroken",
            "Eng0OilGasketLeak",
            "Oil is on fire",
            "Eng0OilSecondariesExtinguished",
            "Eng0OilTankPerforated",
            "Eng0WaterPumpFailure",
            "Eng0WaterRadiatorPerforated",
            "Eng0WaterLineBroken",
            "Eng0WaterTankPerforated",
            "Eng0WaterJacketBroken",
            "Eng0CylinderHeadFire",
            "Eng0CylinderHeadExtinguished",
            "Eng0ExhaustHeadFailure",
            "Eng0GovernorFailure",
            "Eng0GovernorSeizure",
            "Eng0ThrottleControlBroken",
            "Eng0PropControlBroken",
            "Eng0TretiaryControlBroken",
            "PropBlade Broken",
            "Eng0PropBlade1Broken",
            "Eng0PropBlade2Broken",
            "Eng0PropBlade3Broken",
            "Engine Plug 0 failure",
            "FuelTank0TinyLeak",
            "FuelTank0SmallLeak",
            "FuelTank0LargeLeak",
            "FuelTank0Fire",
            "FuelTank0Exploded",
            "FuelTank0HosePerforated",
            "FuelTank0PumpFailure",
            "Machinegun00Failure",
            "Machinegun00BeltBroken",
            "Machinegun00Jammed",
            "Machinegun00Charged",
            "Machinegun00LineDamaged",
            "103 CockpitDamageFlag00: gunsight",
            "104 CockpitDamageFlag01: instruments",
            "CockpitDamageFlag02",
            "CockpitDamageFlag03",
            "CockpitDamageFlag04",
            "CockpitDamageFlag05",
            "CockpitDamageFlag06",
            "CockpitDamageFlag07",
            "CockpitDamageFlag08",
            "CockpitDamageFlag09",
            "CockpitDamageFlag10",
            "CockpitDamageFlag11",
            "CockpitDamageFlag12",
            "CockpitDamageFlag13",
            "CockpitDamageFlag14",
        };
    
        public override void OnTrigger(int missionNumber, string shortName, bool active) 
        {
            if (("trigger01".Equals(shortName) && active))
            {
            		//GamePlay.gpHUDLogCenter("Trigger Activated!");
                DoDamage();
            }
            GamePlay.gpGetTrigger(shortName).Enable = false;
        }
    
        private void DoDamage()
        {
            PlayerPlane = (AiAircraft)GamePlay.gpPlayer().Place();              
                
            Random RandomIncident = new Random();
            
            for (int i = 0; i < 3; i++)
            {
    		        int j = (RandomIncident.Next(1,PlanePartsNr) -1);
    		        PlayerPlane.hitNamed ((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes),PlanePartsList[j]));
    		        GamePlay.gpHUDLogCenter(PlanePartsListText[j]);
    		        serverMessage("Failure: "+PlanePartsListText[j]);
          	}
        }
        
        private void serverMessage(string msg)
        {
            Player pl = GamePlay.gpPlayer();
            Player[] players = { pl };
            object[] args = { msg };
            GamePlay.gpLogServer(players, msg, args);
        }
    
        public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            GamePlay.gpHUDLogCenter("Excellent, you've managed to land!");
        }
    
        public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) 
        {
            GamePlay.gpHUDLogCenter("You've crash-landed, but you're still alive!");
        }
    
    }
    I've tested it, and it works, but it is still based on a list of airplane parts (and another for failure messages). Can't it be done in a simpler way, like in a MG function hit-random-airplane-part() ?

    Question: How can I verify if an airplane's part was hit, or not?

    Question: how AiAircraft.hitLimb(part.LimbNames.<linmb_name>) and AiAircraft.cutLimb(part.LimbNames.<linmb_name>) are working?

    Question: how can we check an AirGroup AiAircraft Actor's characteristics (altitude, heading, speed, aircraft's type, etc)?

    Request: Also, regarding actor messages, if there's no such a function, to allow custom messages be said by actors (as in SayToGroup), can't such a function be made, please?

    Request: if there's no such function to force a mission's time, can't such a function be made, please?

    Request: regarding the custom campaigns using the AddIn method, not every campaign designer is also a coder, can't a generic .dll be made, loading campaign's paths ( USER_PATH = "$user/mission/tst/campaign/" and PATH = "$home/parts/tst/mission/campaign/") from an easily editable text/xml file? (I for one don't have the Visual Studio 2010 installed on my PC, so I can't compile those)

    Thanks!
    Крайний раз редактировалось adonys; 30.06.2011 в 20:32.

  5. #5
    Старший Офицер Форума
    Регистрация
    15.02.2002
    Адрес
    Moscow
    Возраст
    47
    Сообщений
    6,905
    Images
    51

    Re: Вопросы.

    Цитата Сообщение от adonys Посмотреть сообщение
    I've made something like this:


    I've tested it, and it works, but it is still based on a list of airplane parts (and another for failure messages). Can't it be done in a simpler way, like in a MG function hit-random-airplane-part() ?
    No, there is no such fuction . We planed to brake plane parts not randomly, but according to situation

    Цитата Сообщение от adonys Посмотреть сообщение
    Question: How can I verify if an airplane's part was hit, or not?
    no way now, may be we'll add it later . Now it is just integral plane health parameter.

    Цитата Сообщение от adonys Посмотреть сообщение
    Question: how AiAircraft.hitLimb(part.LimbNames.<linmb_name>) and AiAircraft.cutLimb(part.LimbNames.<linmb_name>) are working?
    hitLimb just damages plane part and cutLimb - cut the part away from plane.

    Цитата Сообщение от adonys Посмотреть сообщение
    Question: how can we check an AirGroup AiAircraft Actor's characteristics (altitude, heading, speed, aircraft's type, etc)?
    You can use getParameter function - it gives you big list of characteristics - position of control surfaces, gauges indication, health and so on. Type of plane afair something like "TypedName".

    Цитата Сообщение от adonys Посмотреть сообщение
    Request: Also, regarding actor messages, if there's no such a function, to allow custom messages be said by actors (as in SayToGroup), can't such a function be made, please?
    ok, i transfer your request to programmers

    Цитата Сообщение от adonys Посмотреть сообщение
    Request: if there's no such function to force a mission's time, can't such a function be made, please?
    no game time is very important parameter, and many things depends on it.


    Цитата Сообщение от adonys Посмотреть сообщение
    Request: regarding the custom campaigns using the AddIn method, not every campaign designer is also a coder, can't a generic .dll be made, loading campaign's paths ( USER_PATH = "$user/mission/tst/campaign/" and PATH = "$home/parts/tst/mission/campaign/") from an easily editable text/xml file? (I for one don't have the Visual Studio 2010 installed on my PC, so I can't compile those)
    ok i'll try compile it. By the way there are some free C# compilers like Visual Studio Express you can use it
    Don't happy, be worry

  6. #6

    Re: Вопросы.

    Цитата Сообщение от naryv Посмотреть сообщение
    Цитата Сообщение от adonys Посмотреть сообщение
    Do damage to a random part of a plane (not using the limited Switch construction, which only allows damage to the parts listed in it, therefore a limited number)?
    i'll try answer tomorrow.
    No, there is no such fuction . We planed to brake plane parts not randomly, but according to situation
    I'm still waiting for that code (only if you had something different in your mind than the way I've did it in the above code), please.

    Цитата Сообщение от naryv Посмотреть сообщение
    hitLimb just damages plane part and cutLimb - cut the part away from plane.
    Yeah, I knew that, but I couldn't make it work (I've tried with the AiAircraft.hitLimb(part.LimbNames.WingL0); and AiAircraft.cutLimb(part.LimbNames.WingL0);, but I couldn't managed it to work). Can you please tell my how?

    Цитата Сообщение от naryv Посмотреть сообщение
    You can use getParameter function - it gives you big list of characteristics - position of control surfaces, gauges indication, health and so on. Type of plane afair something like "TypedName".
    Question: Can you explain this
    Код:
    int personIndex = GamePlay.gpPlayer().PlacePrimary();
                        if (personIndex < 0)
                            personIndex = GamePlay.gpPlayer().PlaceSecondary();
                        AiPerson person = (GamePlay.gpPlayer().Place() as AiCart).Person(personIndex);
                        if (person.Health <= 0)
                            return;
                        if (Campaign != null) {
                            if (Campaign.battleSuccess != null)
                                return;
                            Campaign.battleSuccess = true;
                        }
                        GamePlay.gpHUDLogCenter("MISSION COMPLETE");
    piece of code, please? it makes no real sense to me. IT's from the official gb campain and can be found in several missions at the end of the inherited OnActorDead function (for example in the "Stuka Intercept.cs" script). It looks like is checking to see if the player is still alive.. yet.. why check a secondary place (I assume PlaceSecondary it's a second seat, like the gunner in a Stuka), as the player is in a single seated aircraft, and why the as AiCart part, instead as AiAircraft? Please have mercy and try to enlighten me


    Regarding the "CustomSayToAirgroup" function, we need to can put text in mouth of existent actors (AiAircraft or AiCart), or general (for control tower/radar/etc. speaking).

    A list of these characteristics would be wonderful, from where can I get the members of the getParameter class, please?

    Thank you again for everything, you've been very kind, sir
    Крайний раз редактировалось adonys; 01.07.2011 в 01:09.

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •