Results 1 to 12 of 12

Thread: How to make scripts work with your missions

  1. #1
    Supporting Member 92 Sqn. Philstyle (QJ-P)'s Avatar
    Join Date
    Sep 2012
    Location
    Bayern
    Posts
    2,739
    Post Thanks / Like
    Blog Entries
    1
    Total Downloaded
    0

    How to make scripts work with your missions

    This comes from the eminent Salmo:

    There is a simple 3-step process to getting scripts to run with your missions;

    1. Copy the script text and paste it into a new text file (say using notepad).
    2. Save this new file with the same name as your mission file name, but with a .cs extension; e.g. If your mission file is called MyMission.mis, then save the script as MyMission.cs
    3. Make sure that both the mission file & script file are in the same directory & launch your mission. The script will run automatically with the mission.
    Last edited by 92 Sqn. Philstyle (QJ-P); Apr-18-2013 at 07:01.

  2. #2
    Admin ATAG_Snapper's Avatar
    Join Date
    Nov 2011
    Location
    Kitchener, Ontario, Canada
    Posts
    11,626
    Post Thanks / Like
    Total Downloaded
    406.29 MB

    Re: How to make scripts work with your missions

    Stickied. Thanks both to Salmo (I never knew until now how a script was incorporated into a mission. Now I know. ).....and:

    Thanks, Phil, for summarizing in point form and giving Salmo's instructions its rightfully own thread.


    HP Omen Laptop 15, AMD Ryzen 5 5600H 16 GB DDR4 RAM, NVIDIA GeForce RTX 3060 Laptop GPU 6 GB VRAM Win 11 64 bit 22H2 (KB5020044), Nvidia GeForce Driver ver 527.56, TrackIR 5, Gear Falcon Trim Box, Gear Falcon Throttle Quadrant, TM16000 joystick, TM Warthog HOTAS, CH Quadrant, Saitek Pro Combat rudder pedals
    VR: None
    Installation path: C:\Program Files (x86)\Steam\steamapps\common\IL-2 Sturmovik Cliffs of Dover Blitz

  3. #3
    Supporting Member
    Join Date
    Nov 2012
    Location
    Somewhere near Dartford
    Posts
    191
    Post Thanks / Like
    Total Downloaded
    161.38 MB

    Re: How to make scripts work with your missions

    Can multiple scripts required go on 1 .cs file or do individual script elements need there own .cs file or could it be either or ?
    =BKHZ=

  4. #4
    ATAG Member ATAG_Lolsav's Avatar
    Join Date
    Jun 2012
    Posts
    4,684
    Post Thanks / Like
    Blog Entries
    1
    Total Downloaded
    16.32 MB

    Re: How to make scripts work with your missions

    Basha: Yes, but they need to be properly accomodated, ie, under the main script file "header", usually "Amission" type of name

  5. #5
    Novice Pilot
    Join Date
    Dec 2015
    Posts
    98
    Post Thanks / Like
    Total Downloaded
    40.24 MB

    Re: How to make scripts work with your missions

    hello
    i am new to COD but veteran in IL2 mod ,i have some basic questions:
    1) what is a script and where can i see examples of them and how to make and use them ?
    2) once you have one you add it to the mission file in the same folder ?

  6. #6
    Team Fusion ATAG_Bliss's Avatar
    Join Date
    Feb 2011
    Location
    United States of China
    Posts
    4,135
    Post Thanks / Like
    Total Downloaded
    457.02 MB

    Re: How to make scripts work with your missions

    Quote Originally Posted by dog1 View Post
    hello
    i am new to COD but veteran in IL2 mod ,i have some basic questions:
    1) what is a script and where can i see examples of them and how to make and use them ?
    2) once you have one you add it to the mission file in the same folder ?
    A script is basically snippets of code that allow you to have certain things happen in a mission (IE - objectives, scoring, spawning of AI aircraft/objects, destruction of airfields, mission end time, on screen messages, etc.,etc.,etc) Scripts are located in the (.cs) file. Essentially you wil have a (.mis) file, the mission file.. You will have a (.cs file) the script file. And you will have a briefing file for your mission briefing.

    Can a mission be created without any scripts? Definitely. But to do some of the more fancier stuff you see, there is code work required.

    Here's a collection of some old ATAG missions for our online server:http://theairtacticalassaultgroup.co...d&downloadid=7

    And if you are interested in running an online server, here is ATAG's server commander you can download: http://theairtacticalassaultgroup.co...d&downloadid=5

    I would suggest looking at Wolverine's mission which has quite extensive coding involved if you really want to dive in: http://theairtacticalassaultgroup.co...&downloadid=47

    One final note: Within the FMB you can open up a script screen to copy/paste/write scripts although it's much easier to do it in Notepad+ or Visual Basic, etc., but the key component within the FMB, within the script window, is the ability to "compile" your code. This will check your code for errors with regards to using it inside Cliffs of Dover. It's very handy.

    Good luck


    "The dissenter is every human being at those moments of his life when he resigns momentarily from the herd and thinks for himself". - Archibald Macleish


  7. Likes ATAG_Septic, Rostic liked this post
  8. #7
    Novice Pilot
    Join Date
    Dec 2015
    Posts
    98
    Post Thanks / Like
    Total Downloaded
    40.24 MB

    Re: How to make scripts work with your missions

    thank you very much for the extensive explanation and links, i will study all the above and begin practicing .

  9. #8
    Student Pilot
    Join Date
    Aug 2012
    Posts
    4
    Post Thanks / Like
    Total Downloaded
    0

    Re: How to make scripts work with your missions

    Is the in game script editor still working? I cant get a single enemy aircraft to spawn with player pass through or army air triggers?
    The only thing that will trigger are ships!!
    Any ideas??

  10. #9
    Team Fusion TWC_Fatal_Error's Avatar
    Join Date
    Dec 2013
    Location
    Florida
    Posts
    678
    Post Thanks / Like
    Total Downloaded
    226.63 MB

    Re: How to make scripts work with your missions

    what do you have can you send an example show me you triggers set up from the mission file
    i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's,EDTRACKER,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
    [*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com

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

    Re: How to make scripts work with your missions

    xpupx
    Is the in game script editor still working? I cant get a single enemy aircraft to spawn with player pass through or army air triggers?
    The only thing that will trigger are ships!!
    Any ideas??
    If I remember correctly FMB "pass though" is bugged since MG "drama" days, is need add a bit of code in the "script" box in FMB to make then work. I think is this:

    Code:
    using System;
    using maddox.game;
    using maddox.game.world;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.GP;
    
    public class Mission : AMission
    {
        public override void OnTrigger(int missionNumber, string shortName, bool active) 
        {
           base.OnTrigger(missionNumber, shortName, active); 
    
              if ("Trigger_name".Equals(shortName) && active) 
              { 
                    AiAction action = GamePlay.gpGetAction("Trigger_name"); //same as YourTriggerName
                    GamePlay.gpLogServer(null, "Test", new object[] { }); //Testmessage
                    if (action != null)
                   {
                         action.Do();
                   }
                    GamePlay.gpGetTrigger(shortName).Enable = false;            
              }
        }
    }

  12. #11
    Team Fusion Salmo's Avatar
    Join Date
    Nov 2011
    Posts
    2,332
    Post Thanks / Like
    Total Downloaded
    191.25 MB

    Re: How to make scripts work with your missions

    Quote Originally Posted by xpupx View Post
    Is the in game script editor still working? I cant get a single enemy aircraft to spawn with player pass through or army air triggers?
    The only thing that will trigger are ships!!
    Any ideas??
    1Lokos is indeed correct when he says the script GUI window in FMB is bugged. It's on TFS's long TODO list.

  13. Likes ATAG_Lord Wukits liked this post
  14. #12
    Student Pilot
    Join Date
    Aug 2012
    Posts
    4
    Post Thanks / Like
    Total Downloaded
    0

    Re: How to make scripts work with your missions

    Is it just me or FMB missions not working at all now ?
    I get to the create aircraft button and nothing happens? Seem to remember this happening in the first version of the game?
    Can someone let me know if:
    FMB missions works in MP?
    Scripts made in the FMB scripting tool work in a MP mission?
    Is the Weather working now?
    Regards...

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
  •