Jump to content
Lylie

[TUTORIAL] New Spawn Menu Layout

Recommended Posts

Author: Lylie

Difficulty: Easy

Number of files to be edited: 1

Please note, this is my first tutorial so be nice, any feedback positive or negative is greatly appreciated!

 

Step 1:Open MISSIONFILE\dialog\spawnSelection.hpp ( spawnSelection.hpp )

 

Step 2:

Change L16 - L23 (class MainBackground block) to:

class MainBackground: Life_RscText {
            colorBackground[] = {0,0,0,0.7};
            idc = -1;
            x = 0.195781 * safezoneW + safezoneX;
            y = 0.192 * safezoneH + safezoneY;
            w = 0.587812 * safezoneW;
            h = 0.627 * safezoneH;
        };

 

Step 3:

Change L41 - L50 (class MapView block) to:

class MapView : Life_RscMapControl {
            idc = 38502;
            x = 0.195782 * safezoneW + safezoneX;
            y = 0.192 * safezoneH + safezoneY;
            w = 0.587812 * safezoneW;
            h = 0.572 * safezoneH;
            maxSatelliteAlpha = 0.75;//0.75;
            alphaFadeStartScale = 1.15;//0.15;
            alphaFadeEndScale = 1.29;//0.29;
        };

 

Step 4:

Change L54 - L68 (class SpawnPointList block) to:

        class SpawnPointList: Life_RscListNBox {
            idc = 38510;
            text = "";
            sizeEx = 0.041;
            coloumns[] = {0,0,0,1};
            drawSideArrows = 0;
            idcLeft = -1;
            idcRight = -1;
            rowHeight = 0.056;
            x = 0.195781 * safezoneW + safezoneX;
            y = 0.236 * safezoneH + safezoneY;
            w = 0.208281 * safezoneW;
            h = 0.506 * safezoneH;
            colorText[] = {1,1,1,1};
            colorBackground[] = {0,0,0,0.6};
            colorActive[] = {-0,0,0,0.6};
            onLBSelChanged = "_this call life_fnc_spawnPointSelected;";
        };

 

Step 5:

Change L70 - L80 (class spawnButton block) to:

class spawnButton: Life_RscButtonMenu {
            idc = -1;
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
            text = "$STR_Spawn_Spawn";
            onButtonClick = "[] call life_fnc_spawnConfirm";
            x = 0.670156 * safezoneW + safezoneX;
            y = 0.775 * safezoneH + safezoneY;
            w = 0.0567187 * safezoneW;
            h = 0.022 * safezoneH;
            colorText[] = {1,1,1,1};
            colorActive[] = {0,0,0,0.5};
        };

 

Step 6:

Add before the final 2 "};" in the file:

        class CancelButton: Life_RscButtonMenu {
            text = "Return to Lobby"; //--- ToDo: Localize;
            onButtonClick = [ "Abort", true, false ] call BIS_fnc_endMission;
            x = 0.309219 * safezoneW + safezoneX;
            y = 0.775 * safezoneH + safezoneY;
            w = 0.0979687 * safezoneW;
            h = 0.022 * safezoneH;
            colorText[] = {1,1,1,1};
            colorBackground[] = {0,0,0,1};
            colorActive[] = {0,0,0,1};
        };

 

You're all set, repack your mission file, shut down your server, upload your PBO & boot your server up, you should see the spawn menu below, any issues, please feel free to let me know

SpawnMenu.jpg.f8818a16706d4954f16342eb5b26dacf.jpg

Edited by Lylie
Add Author

Share this post


Link to post
Share on other sites

Problem solved

@Lylie It works now! ^^

The problem was copying and pasting. Symbols invisible to the naked eye, had slipped into the blocs of the script in question.

I do not know what you use as editor, but I use Notepad ++.

It was only when I looked at my * .rtp file that I understood that the error came from there.

Spoiler

Warning Message: File mpmissions\__cur_mp.Tanoa\dialog\spawnSelection.hpp, line 42: '/life_spawn_selection/controlsBackground/MapView.': '§ encountered instead of '='

Here is my spawnSelection.hpp (I hope without this problem) :)

spawnSelection.hpp (from Altis/Tanoa Life 5.0)

Edited by [HELIXE™] [email protected]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.