1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2014, 05:05 PM
usbStuck usbStuck is offline
Junior Member
 
Join Date: Jan 2014
Posts: 2
Default How to put custom entries in the mission menu

Hi all,
I'm working on my very first coop practise mission with some ground targets, etc.

I'm almost done, but I want to add a custom entry in the mission menu (the one you can access by pressing TAB)

I've been playing around with some other scripts but I can't get it to work. Can someone help me out?

I pasted the part of the script that matters (I think) below:
Code:
    enum MenuID
    {
        objectiveStatus
    }

    public void SetMainMenu(Player player)
    {
        string[] entries = { "Mission status" };
        bool[] entriesSubmenu = { false };

        GamePlay.gpSetOrderMissionMenu(player, false, (int)MenuID.objectiveStatus, entries, entriesSubmenu);
    }

    public override void OnOrderMissionMenuSelected(Player player, int ID, int menuItemIndex)
    {
        base.OnOrderMissionMenuSelected(player, ID, menuItemIndex);

        // even this is not showing
        GamePlay.gpHUDLogCenter("menu id: " + ID.ToString() + " | menuItemIndex: " + menuItemIndex.ToString());

        // i'm sure i'm doing something wrong with the id and menuItemIndex here...
        if (ID == 0)
        {
            SetMainMenu(player);
        }
        else if (ID == (int)MenuID.objectiveStatus)
        {
            if (menuItemIndex == 1)
            {
                GamePlay.gpHUDLogCenter("Howdy son! I will link to a method that will display the objective status");
                SetMainMenu(player);
            }
        }
    }
Reply With Quote
  #2  
Old 01-31-2014, 07:20 PM
Sokol1's Avatar
Sokol1 Sokol1 is offline
Approved Member
 
Join Date: Oct 2007
Posts: 727
Default

usbStuck

I suggest post your question in ATAG-FMB too, for better visibility, there some active mission makers/"scripters" regularly post.

http://theairtacticalassaultgroup.co...splay.php?f=50

Here is almost a "ghost city" now.

Sokol1
__________________
"...we did Co-ops every week. I used to read all the complaints on bananarama how coops was impossible and then I'd go and have a great squad night flying coops....couldn't figure out what they were complaining about. "
Reply With Quote
  #3  
Old 02-12-2014, 12:11 PM
usbStuck usbStuck is offline
Junior Member
 
Join Date: Jan 2014
Posts: 2
Default

thanks for your reply. It's indeed not very busy here anymore
Thought this forum was more tech-oriented, but will post future messages at ATAG.
Cheers
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:37 PM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.