Results 1 to 27 of 27

Thread: Script action don't work.

  1. #1
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Script action don't work.

    This is script compile OK, don't generate errors in console and fire two trigger, both triggers are firing OK, confirmed by messages in Server Info Windows.

    First trigger (vehicle pass thru) spawn an AI plane - OK.

    Second trigger should make this plane say a voice message (from speech folder).... but nothing happens.

    Code:
    using System;
    using System.IO;
    using System.Collections;
    using maddox.game;
    using maddox.game.world;
    
    public class Mission : AMission
    {
       AiActor a1;
       AiAircraft airc1;
       public override void OnTrigger(int missionNumber, string shortName, bool active)
       {
            base.OnTrigger(missionNumber, shortName, active);
    
            if ("t1".Equals(shortName))
            {
                AiAction Action = GamePlay.gpGetAction(shortName); // if your action has an other Name than your trigger change GamePlay.gpGetAction(shortName) into GamePlay.gpGetAction("ActionName")
    
                if (Action != null)
                    Action.Do();
    			    GamePlay.gpLogServer(null, "...", new object[] { }); //Message in Server Info window confirming trigger 
    			  {
                GamePlay.gpGetTrigger(shortName).Enable = false; // if trigger is TPassThru disable to avoid multiple activation
    
                return; // leave method to avoid second call of the Action
            }
    		}	
        {	
            public virtual void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    		{
             base.OnActorCreated(missionNumber, shortName, AiActor, AiAircraft);
    			
    		 a1 = GamePlay.gpActorByName("0:BoB_RAF_B_218Sqn.000");
    		 airc1 = (AiAircraft)a1;
             if ("t2".Equals(shortName) && active) 
    		 {
                double initTime = 0.0;
    			    Timeout(initTime += 2.0, () => 
    				{
                     airc1.SayToGroup(airc1.AirGroup(), "Mission_accomplished_Excellent_Just_like_the_movies");
    			    });
    		 }
             }
        }
      }
    }
    "SayToGroup" is in

    Code:
    AiAircraft
    
    namespace maddox.game.world
    {
        using part;
        using System;
    
        public interface AiAircraft : AiCart, AiActor
        {
            AiAirGroup AirGroup();
            string CallSign();
            int CallSignNumber();
            void cutLimb(LimbNames limb);
            double getParameter(ParameterTypes type, int subtype);
            void hitLimb(LimbNames limb, double value);
            void hitNamed(NamedDamageTypes type);
            string HullNumber();
            bool IsAirborne();
            bool IsKilled();
            maddox.game.world.Regiment Regiment();
            void SayToGroup(AiAirGroup group, string msg);
            AircraftType Type();
            string TypedName();
        }
    }
    And "SayToGroup" work OK in other missions, triggered by player or AI aircraft. I tried play with vehicles (Chief) but seems no link of the function for those.

    What is "AiCart"?
    Last edited by 1lokos; Sep-15-2020 at 11:02.

  2. #2
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Have you tested that everything except the saytogroup is working, by getting your t2 to just display a HUDlogCenter message as a test?

    And if you are spawning something in make sure to have the 'listen to mission' thing included in your code.

    As I found was an issue here:

    https://theairtacticalassaultgroup.c...l=1#post362549

    As Oscar says, you can just put it in onBattleStarted
    Last edited by Yo-Yo; Sep-13-2020 at 13:54.
    I am Yo-Yo not YoYo (that's someone else)

  3. #3
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Quote Originally Posted by Yo-Yo View Post
    Have you tested that everything except the saytogroup is working, by getting your t2 to just display a HUDlogCenter message as a test?
    Instead "HUDlogCenter" I am using "gpLogServer" that show the message in Server Info Window (I hate "HUD" ), but yes, the trigger 2 is firing, because I see the message (just '---').

    But in any case, double confirmed:

    Trigger2.jpg

    Now let try figure this "listen to mission"... without broken what are working.
    Last edited by 1lokos; Sep-13-2020 at 14:26.

  4. #4
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    Instead "HUDlogCenter" I am using "gpLogServer" that show the message in Server Info Window (I hate "HUD" ), but yes, the trigger 2 is firing, because I see the message (just '---').

    But in any case, double confirmed:

    Trigger2.jpg

    Now let try figure this "listen to mission"... without broken what are working.
    I'll have to try the server message myself!

    Just put this in:

    Code:
        public override void OnBattleStarted()
        {
            MissionNumberListener = -1;
        }
    I am Yo-Yo not YoYo (that's someone else)

  5. #5
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    No progress...

    But at least figure that trigger 2 is done what was set for do... just nothing.

    Happens that I don't figure how tie "SayToGroup" with an trigger, why try use the "OnActorCreated" (the plane spawned by trigger 1) for use "SayToGroup", but something is not correct.

    The only example I have is complicated, use plane loaded in mission and have this


    AiActor a1;
    AiAircraft airc1;

    airc1 = (AiAircraft)a1;

  6. #6
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    No progress...

    But at least figure that trigger 2 is done what was set for do... just nothing.

    Happens that I don't figure how tie "SayToGroup" with an trigger, why try use the "OnActorCreated" (the plane spawned by trigger 1) for use "SayToGroup", but something is not correct.

    The only example I have is complicated, use plane loaded in mission and have this


    AiActor a1;
    AiAircraft airc1;

    airc1 = (AiAircraft)a1;
    I was just looking at an example of that sort of code but it needs an extra bit maybe to tie the Aircraft to the actor?


    I figure you're trying to get it running in a different place, but just wonder if you can define it in the onBattleStarted instead?


    Code:
    public class Mission : maddox.game.campaign.Mission {
    
        AiActor a1;
        AiAircraft airc1;
    
        public override void OnBattleStarted() {
    
            a1 = GamePlay.gpActorByName("0:BoB_RAF_F_FatCat_Early.001");
    
            airc1 = (AiAircraft)a1;
      
        }
    }
    I'm sorry if I am not helping, I don't know too much at all so am probably just making things worse! The code i was looking at for the above is in the BoB GB campaign, mission: 109 Furball.
    I am Yo-Yo not YoYo (that's someone else)

  7. #7
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Yes, if set at OnBattleStarted (like in Kodiak examples) work OK.

    But as I like complicate things for nothing, at load my mission don't have planes, just after a vehicle trigger a spawn the plane appear.

  8. #8
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Script action don't work.

    Try this.


    Code:
    using System;
    using System.IO;
    using System.Collections;
    using maddox.game;
    using maddox.game.world;
    
    public class Mission : AMission
    {
    
       AiAircraft airc1;
    
        public override void OnBattleStarted() 
        {
            MissionNumberListener = -1;
    	airc1 = (AiAircraft)GamePlay.gpActorByName("0:BoB_RAF_B_218Sqn.000");
        }
    
       public override void OnTrigger(int missionNumber, string shortName, bool active)
       {
            if ("t1".Equals(shortName)) 
            {
                AiAction Action = GamePlay.gpGetAction(shortName);
                if (Action != null)
    			{
                                Action.Do();
    			    GamePlay.gpLogServer(null, "...", new object[] { }); //Message in Server Info window confirming trigger 
    		            GamePlay.gpGetTrigger(shortName).Enable = false; // if trigger is TPassThru disable to avoid multiple activation
    			    return; // leave method to avoid second call of the Action
    			}
    		}	
            if ("t2".Equals(shortName) && active) 
    		{
                double initTime = 0.0;
    			Timeout(initTime += 2.0, () => 
    			{
                     airc1.SayToGroup(airc1.AirGroup(), "Mission_accomplished_Excellent_Just_like_the_movies");
    			});
    		}
        }
    
    }
    Last edited by ATAG_Oskar; Sep-13-2020 at 20:41.

  9. Likes N/A liked this post
  10. #9
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Than's Oskar.

    But plane remains silent.

  11. #10
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    ...at load my mission don't have planes, just after a vehicle trigger a spawn the plane appear.
    I don't understand this 1lokos. Is there no player plane?

    If the actor that you are trying to identify is not present until after the trigger, can you move this line from Oskar's code

    Code:
    airc1 = (AiAircraft)GamePlay.gpActorByName("0:BoB_RAF_B_218Sqn.000");
    so it is in the onTrigger part of your code?
    Last edited by Yo-Yo; Sep-14-2020 at 05:00.
    I am Yo-Yo not YoYo (that's someone else)

  12. #11
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Is there no player plane?
    Nope, when mission load the player is "passenger" in a vehicle going for hangar, before the vehicle turn and have visibility of the hangar the plane spawn inside.

    Player "jump" for the plane with the controls Shift+F2 followed by "Take control of selected Ai aircraft".

    I can't add any plane at mission start because if add the camera focus in the plane (even enemy AI plane) and not in the vehicle, so the first trigger is for spawn the plane.

    My (planed) "mini-campaign" (with Tiger Moth) have some short "missions" in what player do nothing - is just a spectator, they are ... "cut-scene".

    BTW - IF in the next patch TFS make that Maddox Sport (MG TA) drivable, will simplify the things a lot.


    Yes, the plane identify can't be done at mission load, because plane are not there and so their action is script is disabled.

    This "MissionNumberListener = -1;" don't make the spawned plane visible for the script.

    is la croix bpa free
    Last edited by 1lokos; Sep-14-2020 at 18:11.

  13. Likes ITAF_Airone1989 liked this post
  14. #12
    ATAG Member ATAG_Ribbs's Avatar
    Join Date
    Jan 2012
    Posts
    1,943
    Post Thanks / Like
    Total Downloaded
    4.11 MB

    Re: Script action don't work.

    I love your idea of being the passenger in the vehicle being driven to the plane and hangar. I wonder it there would be a way to " simulate being able to walk around by being able to hit leave vehicle and then being able to move around using the WASD keys. That way we could walk over to a plane or vehicle and " jump in?
    Cheers
    Ribbs

    INTEL I5 4670 /16 MB DDR3/ MSI Z97 PCMATE MB
    MSI GTX 1060 3 GIG
    WIN 7 64
    MS Sidewinder 2 precision pro Saitek x52 throttle quadrant


    By ATAG_Lewis

  15. #13
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Yes, I get that single players like this "futile" things.

    About move around is not possible, even as "ghost".
    In the list of animations are "Base Walk and Run", but no idea what they planned do - but give up, with this.

    anim 3do/humans/aircrew/anim/Menu_Move1.ani
    anim 3do/humans/aircrew/anim/Menu_Move2.ani
    anim 3do/humans/aircrew/anim/Menu_Move3.ani
    anim 3do/humans/aircrew/anim/Menu_Move4.ani
    anim 3do/humans/aircrew/anim/Menu_Stay.ani
    anim 3do/humans/aircrew/anim/Menu_Swing.ani
    //anim 3do/humans/aircrew/anim/Menu_LookAround.ani
    //anim 3do/humans/aircrew/anim/Menu_ShakeOff.ani
    //anim 3do/humans/aircrew/anim/Menu_Cough.ani <<<<<

    anim 3do/humans/aircrew/anim/Base_Walk.ani <<<<<<
    anim 3do/humans/aircrew/anim/Base_Run.ani <<<<<<

    BTW - Intriguing this "problems A, B, C" animations for Spitfire pilot open the canopi before bail out:

    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Leave.ani
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Bailout.ani
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_A.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_B.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_C.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_BailOut_A.ani
    anim 3do/humans/aircrew/anim/Spit_BailOut_B.ani
    anim 3do/humans/aircrew/anim/Spit_BailOut_C.ani
    Last edited by 1lokos; Sep-15-2020 at 00:15.

  16. #14
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    Nope, when mission load the player is "passenger" in a vehicle going for hangar, before the vehicle turn and have visibility of the hangar the plane spawn inside.

    Player "jump" for the plane with the controls Shift+F2 followed by "Take control of selected Ai aircraft".

    ...
    Fair enough, that's a good idea!

    There's probably some code you can have that will show your message when you take up a 'place' in that 'aircraft' but it's beyond me for now.
    I am Yo-Yo not YoYo (that's someone else)

  17. #15
    ATAG Member ATAG_Ribbs's Avatar
    Join Date
    Jan 2012
    Posts
    1,943
    Post Thanks / Like
    Total Downloaded
    4.11 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    Yes, I get that single players like this "futile" things.

    About move around is not possible, even as "ghost".
    In the list of animations are "Base Walk and Run", but no idea what they planned do - but give up, with this.

    anim 3do/humans/aircrew/anim/Menu_Move1.ani
    anim 3do/humans/aircrew/anim/Menu_Move2.ani
    anim 3do/humans/aircrew/anim/Menu_Move3.ani
    anim 3do/humans/aircrew/anim/Menu_Move4.ani
    anim 3do/humans/aircrew/anim/Menu_Stay.ani
    anim 3do/humans/aircrew/anim/Menu_Swing.ani
    //anim 3do/humans/aircrew/anim/Menu_LookAround.ani
    //anim 3do/humans/aircrew/anim/Menu_ShakeOff.ani
    //anim 3do/humans/aircrew/anim/Menu_Cough.ani <<<<<

    anim 3do/humans/aircrew/anim/Base_Walk.ani <<<<<<
    anim 3do/humans/aircrew/anim/Base_Run.ani <<<<<<

    BTW - Intriguing this "problems A, B, C" animations for Spitfire pilot open the canopi before bail out:

    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Leave.ani
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Bailout.ani
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_A.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_B.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_OpenBlister_Problem_C.ani <<<<<
    anim 3do/humans/aircrew/anim/Spit_BailOut_A.ani
    anim 3do/humans/aircrew/anim/Spit_BailOut_B.ani
    anim 3do/humans/aircrew/anim/Spit_BailOut_C.ani
    Where did u find these?The a/b/c spitfire pilot animation you show is probably from that teaser video from quite awhile back. I wish i could find it again. It was cool.
    I thought awhile back they actually made it to where you could get out. ( Maybe dreaming). They could take the bicycle guy, and put a camera where his head would be, and let us move around like that.. haha
    Last edited by ATAG_Ribbs; Sep-15-2020 at 09:42.
    Cheers
    Ribbs

    INTEL I5 4670 /16 MB DDR3/ MSI Z97 PCMATE MB
    MSI GTX 1060 3 GIG
    WIN 7 64
    MS Sidewinder 2 precision pro Saitek x52 throttle quadrant


    By ATAG_Lewis

  18. #16
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    When I have early CloD installed I use Keygets.dll for perk in internal files, and here much things are like in IL-2:46 just defined in text files.

    But I lost this version in a Windows re-install and now STEAM don't allow install anymore, because try update for latest versions.

    BTW - "Ten years ago..."

    Last edited by 1lokos; Sep-16-2020 at 16:02.

  19. Likes BlacKnight liked this post
  20. #17
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    At least figure where the problem is - just don't know what to do now.

    AiActor a1;
    AiAircraft airc1;
    airc1 = (AiAircraft)a1;

    These instructions are defining that the "AiActor" plane is controlled by player, the spawned plane is AI until player take control, why the "SayToGroup" don't say anything.

    Spoiler: 

    Original Kodiak script (work too OnTrigger).
    Code:
    using System;
    using maddox.game;
    using maddox.game.world;
    
    
    public class Mission : AMission
    {
    
        AiActor a1;
        AiAircraft airc1;
    
        public override void OnBattleStarted()
        {
            base.OnBattleStarted();
            a1 = GamePlay.gpActorByName("0:BoB_LW_JG26_I.000");
    
    
            if (a1 == null)
            {
                GamePlay.gpLogServer(null, "SCRIPT ERROR: Aircraft not found\n", new object[] {});
            }
    
            airc1 = (AiAircraft)a1;
        }
    
        public override void OnTickGame()
        {
            if (Time.tickCounter() == 300) // ca 10sec.        
            {
                double initTime = 0.0;
    
                airc1.SayToGroup(airc1.AirGroup(), "1_mile");
    
                Timeout(initTime += 5.0, () =>
                {
                    airc1.SayToGroup(airc1.AirGroup(), "Cargo_Ships");
                });
                Timeout(initTime += 5.0, () =>
                {
                    airc1.SayToGroup(airc1.AirGroup(), "Destroy_targets_left_to_right");
                });
                Timeout(initTime += 5.0, () =>
                {
                    airc1.SayToGroup(airc1.AirGroup(), "Attack");
                });
            }
    
        public override void OnTrigger(int missionNumber, string shortName, bool active) {
            if ("trigger01".Equals(shortName) && active) {
                double initTime = 0.0;
    			    Timeout(initTime += 5.0, () => {
                        airc1.SayToGroup(airc1.AirGroup(), "K");
    			    });
                    Timeout(initTime += 5.0, () => {
                        airc1.SayToGroup(airc1.AirGroup(), "Loitering_here");    
                    });
                    Timeout(initTime += 5.0, () => {
                        airc1.SayToGroup(airc1.AirGroup(), "Pay_attention");       
                    });
                    Timeout(initTime += 5.0, () => {
                        airc1.SayToGroup(airc1.AirGroup(), "Please_climb_now");        
                    });                       
            }
        }
    }

  21. Likes ATAG_Oskar liked this post
  22. #18
    varrattu
    Guest

    Re: Script action don't work.

    Hello 1lokos, the script generates CS1513:
    The method <public override void OnTickGame()> expected a closing curly brace (}).




    ---oOo---

    In old versions some of the pre-recorded messages were broken & didn't play even when the code is correct. Please have a look:

    Salmo's post on 01-04-2013


    ~V~
    Attached Images Attached Images
    Last edited by varrattu; Sep-17-2020 at 10:24.

  23. #19
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Yes, I know about sounds, all .ogg files with 5k or less are blank... a "to do" thing.

    But "Hello_guys.ogg" (18.5 k) are OK.

    I guess that I am one that more fiddle with CloD sounds, I use mix then to fill those gaps, e.g. the answer for Tab-7-3 here say: "Wind TO" and "Ignore strip" (whose direction is meaningless).

    Thing is that the dammed Steam copy back the blanks files in updates, file validation.

    When I pick some of this old scripts I check curly braces in Notepad++ and the run the FMB "compile", so at lest basic errors is avoided.

    Anyway the issue is: Kodiak script work with player plane, but don't work with AI plane.
    The script is OK, I set Ticket to coincide with Trigger and both voices are played together.



    BTW - I have installed Visual Studio 2019 but don't figure in what can help me with scripts, other than check curly braces, what Notepad++ do in a more simple and "elegant" way.
    Visual Studio have some check like FMB 'compile"?
    Last edited by 1lokos; Sep-17-2020 at 11:31.

  24. #20
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    At least figure where the problem is - just don't know what to do now.

    AiActor a1;
    AiAircraft airc1;
    airc1 = (AiAircraft)a1;

    These instructions are defining that the "AiActor" plane is controlled by player, the spawned plane is AI until player take control, why the "SayToGroup" don't say anything.

    I've no idea how to take control of an AI aircraft as I never do anything except fly my own, and have all my own key mappings so don't know what you mean by just ctrl+f2.

    If you use the following after the aircraft has spawned and with 'listening' on

    Code:
     // Get player aircraft name
            string playerIs;
            Player player = GamePlay.gpPlayer();
            playerIs = player.Place().Name();
            GamePlay.gpHUDLogCenter(playerIs);
    Does it not display the aircraft name, so note it down and forget the above code

    Then you can then use /substitute whatever it is in this bit instead of the 218Sqdn etc.

    Code:
    airc1 = (AiAircraft)GamePlay.gpActorByName("0:BoB_RAF_B_218Sqn.000");
    Which then is used in the:

    Code:
    airc1.SayToGroup(airc1.AirGroup(), "Mission_accomplished_Excellent_Just_like_the_movies");
    line later on?
    I am Yo-Yo not YoYo (that's someone else)

  25. #21
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    BTW - I have installed Visual Studio 2019 but don't figure in what can help me with scripts, other than check curly braces, what Notepad++ do in a more simple and "elegant" way.
    Visual Studio have some check like FMB 'compile"?
    Make a solution like this:

    miss.jpg

  26. #22
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Quote Originally Posted by Yo-Yo View Post
    I've no idea how to take control of an AI aircraft as I never do anything except fly my own, and have all my own key mappings so don't know what you mean by just ctrl+f2.
    CloD, although was not the first CFS game that feature this, allow you "jump" for the cockpit of any AI plane of the mission (in SP only).

    First you move the camera (Shift+F2, Ctrl+F2 for enemy) - or select the plane in the object menu accessible with right click in screen and the use the command "Take control of selected AI Aircraft" (in View section).

    This command in used too for control some tanks and FLAK guns (but those are in very "alpha" state).

    And used too for move for Tiger Moth frontal cockpit, together with change position command, send in inverse way:
    first "take control" then "change cockpit", if do the other way around (what sounds more logic) AI take control of both cockpits. "It's CloD!" ways.

    About the "SayToGroup", my conclusion is that work only if initiated by player plane (in campaign_gb) Ai plane "talk" with player plane, after him talk for first time.

    I have tried all I can imagine, last attempt was more "complicated":

    An vehicle fire a trigger, that load a sub mission* with AI plane in flight, this AI plane fire another trigger, that spawn player plane, who supposedly should "SayToGroup"... all work, less the "SayTo"...

    * I notice that load a sub-mission with AI plane cause less "hiccups" to the game that spawn a plane in actual mission

    In this ZIP the second mission that load, has two planes, an Blenheim and a Tiger Moth - set as player plane, spawned by Blenheim fly over trigger.

    And "SayTo..." say nothing.

    But changing Player plane for Blenheim "SayTo" work, by Ticked and by Trigger.

    SayTo.zip
    Last edited by 1lokos; Sep-17-2020 at 22:08.

  27. #23
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Ah I see, yes you are probably right on it needed the player plane to talk first or something.
    I am Yo-Yo not YoYo (that's someone else)

  28. #24
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    Well, well.. my "script'archaeology" in 1c Cliffs forum definitively buried my hopes on "SayToGroup".

    With this Kodiak script - an early attempt to create a "Radar", enemy contacts position is checked and reported using pre-recorded .ogg files (SayToGroup), and repeat at every ~10 seconds... latter this script became more sophisticated, including the 4 minutes delay of real Chain Home, and less "cacophony".

    http://forum.1cpublishing.eu/showpos...06&postcount=7

    This script don't use the check:

    AiActor a1;
    AiAircraft airc1;

    Work OK with player in aircraft.

    But if set plane as AI nothing is heard - as predictable.

    But if after some time player "jump" in AI plane cockpit, since the report continues to be repeated every 10 seconds... messages became audible (and visible with messages in "Radio" Info Window).
    Last edited by 1lokos; Sep-21-2020 at 12:43.

  29. #25
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    ...

    But if after some time player "jump" in AI plane cockpit, since the report continues to be repeated every 10 seconds... messages became audible (and visible with messages in "Radio" Info Window).
    Isn't that what you are trying to acheive?
    I am Yo-Yo not YoYo (that's someone else)

  30. #26
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,323
    Post Thanks / Like
    Total Downloaded
    1.04 GB

    Re: Script action don't work.

    The detail is that I want use the "talk" before the player enter the plane, in the "cut-scene" part.

  31. #27
    Supporting Member
    Join Date
    Dec 2019
    Posts
    473
    Post Thanks / Like
    Total Downloaded
    22.61 MB

    Re: Script action don't work.

    Quote Originally Posted by 1lokos View Post
    The detail is that I want use the "talk" before the player enter the plane, in the "cut-scene" part.
    Ah, I see.
    I am Yo-Yo not YoYo (that's someone else)

Bookmarks

Posting Permissions

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