Modifying Custom Pause Menu Issue

maxman

Well-known member
The custom pause menu script which was created by @Kratus himself, works wonders! It really works for my Street Fighter project and any other mod. However, it doesn't display itself in my Rhythm of Destruction mod. Despite using the same code from both the template and my SF project, it doesn't show in ROD.

This is my update.c for ROD.
C:
#import "data/scripts/dc_bug_patch/continue_timer.c"
//#import "data/scripts/menu/pauseMenu.c"

void oncreate()
{
}

void ondestroy()
{
}

void main()
{
    /*
    * Execute the bug patch function.
    * The numeric value is allowed
    * continue time in game seconds.
    * Native engine default is 10.
    */
    int continue_time = 20;

    dc_continue_bug_patch(continue_time);

    LastNumber();
    //titleMusic();
    if(pausingGo()) result;
}

void titleMusic()
{
    if(openborvariant("in_menuscreen") || openborvariant("in_titlescreen"))
    {      
        if(getlocalvar("MusicMenu") == NULL())
        {
            playmusic("Data/Music/versus.bor", 1);
            setlocalvar("MusicMenu", 1);
        }
    }
    else {if(getlocalvar("MusicMenu") != NULL()) setlocalvar("MusicMenu", NULL());}
}

void LastNumber()
{
    //if(pausingGo()) return;

    if(openborvariant("in_level"))
    {
        int P1 = getplayerproperty(0, "entity");
        int P2 = getplayerproperty(1, "entity");
        int P1Life = getplayerproperty(0, "lives");
        int P2Life = getplayerproperty(1, "lives");

        if(P1)
        {
            drawstring(131, 2, 3, P1Life-1);
        }

        if(P2)
        {
            drawstring(311, 2, 3, P2Life-1);
        }

    }
}

void pausingGo()
{
    //NECESSARY STEP TO RESET THE "MENU OPTION" VARIABLE AT THE TITLE SCREEN
    if(openborvariant("in_titlescreen")){
        if(getglobalvar("menuPause") != 0){setglobalvar("menuPause", 0);}
    }

    //CHECK IF THE PLAYER IS IN A LEVEL
    if(openborvariant("in_level")){
        int volume        = openborvariant("effectvol");
        int speed        = 100;
        int loop        = 0;
        int menuPause    = getglobalvar("menuPause");
        int max            = 3;
        int min            = 0;
        int add            = 1;

        //CHECK IF THE GAME IS PAUSED BUT NOT IN OPTIONS
        if(openborvariant("game_paused") && !openborvariant("in_options")){

            //DETECT UP/DOWN BUTTON PRESS AND CHANGE THE HIGHLIGHTED OPTION
            if(    playerkeys(0, 1, "movedown")||
                playerkeys(1, 1, "movedown")||
                playerkeys(2, 1, "movedown")||
                playerkeys(3, 1, "movedown")){
              
                if(menuPause >= min && menuPause < max){setglobalvar("menuPause", menuPause+add);}
                if(menuPause == max){setglobalvar("menuPause", min);}
            }
            if(    playerkeys(0, 1, "moveup")||
                playerkeys(1, 1, "moveup")||
                playerkeys(2, 1, "moveup")||
                playerkeys(3, 1, "moveup")){
              
                if(menuPause > min && menuPause <= max){setglobalvar("menuPause", menuPause-add);}
                if(menuPause == min){setglobalvar("menuPause", max);}
            }

            //DEFINE A FUNCTION TO BE EXECUTED WHEN EACH OPTION IS CONFIRMED BY PRESSING ACTION KEYS
            //NOTE THAT SOME OPTIONS ALREADY PLAY SAMPLES NATIVELY, ONLY A FEW NEED TO BE MANUALLY PLAYED
            if(    playerkeys(0, 1, "anybutton")||
                playerkeys(1, 1, "anybutton")||
                playerkeys(2, 1, "anybutton")||
                playerkeys(3, 1, "anybutton")){
              
                //LOCK NATIVE KEYS
                changeplayerproperty(0, "newkeys", 0);
                changeplayerproperty(1, "newkeys", 0);
                changeplayerproperty(2, "newkeys", 0);
                changeplayerproperty(3, "newkeys", 0);

                //CONTINUE
                if(menuPause == 0){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(0, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(1, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(2, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(3, "newkeys", openborconstant("FLAG_START"));
                }

                //OPTIONS
                if(menuPause == 1){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    options();
                }

                //HOW TO PLAY
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    setglobalvar("menuPause", 0);
                    playgif("data/scenes/howto.gif");
                }

                //END GAME
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(0, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(1, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(2, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(3, "newkeys", openborconstant("FLAG_START"));
                }
            }

            //TEXTS, IMAGES AND EFFECTS
            void str;
            float hRes        = openborvariant("hresolution");
            int align;
            int yPos        = 80;
            int fontPause    = 3;
            int font0        = 0;
            int font1        = 0;
            int font2        = 0;
            int font3        = 0;
            int yAdd        = 11;
            int layer        = 50000000; //-1000000003;

            //DEFINE FONTS TO HIGHLIGHTED OPTIONS
            if(getglobalvar("menuPause") == 0){font0 = 1;}else    //IS CONTINUE HIGHLIGHTED??
            if(getglobalvar("menuPause") == 1){font1 = 1;}else    //IS OPTIONS HIGHLIGHTED??
            if(getglobalvar("menuPause") == 2){font2 = 1;}else    //IS HOW TO PLAY HIGHLIGHTED??
            if(getglobalvar("menuPause") == 3){font3 = 1;}        //IS END GAME HIGHLIGHTED??

            str = "Pause";align = (hRes-(strwidth(str, fontPause)))/2;
            drawstring(align, yPos, fontPause, str, layer);

            yPos = yPos+yAdd*3;
            str = "Continue";align = (hRes-(strwidth(str, font0)))/2;
            drawstring(align, yPos, font0, str, layer);

            yPos = yPos+yAdd;
            str = "Options";align = (hRes-(strwidth(str, font1)))/2;
            drawstring(align, yPos, font1, str, layer);

            yPos = yPos+yAdd;
            str = "How To Play";align = (hRes-(strwidth(str, font2)))/2;
            drawstring(align, yPos, font2, str, layer);

            yPos = yPos+yAdd;
            str = "End Game";align = (hRes-(strwidth(str, font3)))/2;
            drawstring(align, yPos, font3, str, layer);
        }

        //LOCK ACTION KEYS, NECESSARY STEP TO QUIT FROM THE OPTIONS IGNORING THE NATIVE "END GAME" OPTION
        if(openborvariant("game_paused") && openborvariant("in_options")){
            changeplayerproperty(0, "newkeys", 0);
            changeplayerproperty(1, "newkeys", 0);
            changeplayerproperty(2, "newkeys", 0);
            changeplayerproperty(3, "newkeys", 0);
        }

        //NECESSARY STEPS THAT NEEDS TO RUN AFTER SOME OPTIONS LIKE "END GAME" ARE CONFIRMED
        //THERE'S A FEW ENGINE FUNCTIONS THAT ONLY RUNS OUTSIDE OF THE PAUSE MENU
        if(!openborvariant("game_paused") && !openborvariant("in_options")){

            //END GAME
            if(menuPause == 3){gameover();}
        }
    }
}

I don't understand why it's not working at all.

Another issue I have is that I'm trying to include a certain model as a music option or something else. And I have to press anybutton and then escape button, to look at the music menu. Sometimes, I press "anybutton", "start", and then "escape", just to look at it too. I removed playgif and (excluded) setglobalvar("menuPause", 0) from the 3rd option, so I could input the music menu as an option in the pause menu.

Here is the invisible music entity as a list of music selection.
C:
name MusicSelect
type text
shadow 0

anim idle
@script
    void self = getlocalvar("self");
    int index = getentityproperty(self, "playerindex");
    void up = playerkeys(index, 0, "moveup");
    void down = playerkeys(index, 0, "movedown");
    void pick = playerkeys(index, 0, "anybutton");

    int Cframe = getentityproperty(self, "animpos");

    if(frame >= 1)
    {
        if(Cframe == 3 && down){updateframe(self, 4);}// NO SOUND TO BEGIN
        if(Cframe == 6 && up){updateframe(self, 7);} // SOUND TO GO UP
        if(Cframe == 9 && down){updateframe(self, 4);} // SOUND TO GO DOWN

        if(Cframe == 3 && pick){fademusic(0.5, "data/music/dojo/001.ogg", 1, 470767.5); updateframe(self, 24); }
        if(Cframe == 6 && pick){fademusic(0.5, "data/music/dojo/002.ogg", 1, 43526.7); updateframe(self, 24); }
        if(Cframe == 9 && pick){fademusic(0.5, "data/music/dojo/001.ogg", 1, 470767.5); updateframe(self, 24); }
    }

@end_script
    delay 11
    offset 1 1
    frame data/chars/0misc/empty.gif # 0
    @cmd settextobj 0 60 50 1 999999999 "001"
    @cmd settextobj 1 60 60 0 999999999 "002"
    frame data/chars/0misc/empty.gif # 1
    frame data/chars/0misc/empty.gif # 2
    @cmd updateframe getlocalvar("self") 2
    frame data/chars/0misc/empty.gif # 3
    sound data/sounds/beep.wav
    @cmd settextobj 0 60 50 0 999999999 "001"
    @cmd settextobj 1 60 60 1 999999999 "002"
    frame data/chars/0misc/empty.gif # 4
    frame data/chars/0misc/empty.gif # 5
    @cmd updateframe getlocalvar("self") 5
    frame data/chars/0misc/empty.gif # 6
    sound data/sounds/beep.wav
    frame data/chars/0misc/empty.gif # 7
    @cmd settextobj 0 60 50 1 999999999 "001"
    @cmd settextobj 1 60 60 0 999999999 "002"
    frame data/chars/0misc/empty.gif # 8
    @cmd updateframe getlocalvar("self") 8
    frame data/chars/0misc/empty.gif # 9
    sound data/sounds/beep.wav
    frame data/chars/0misc/empty.gif # 10
    @cmd settextobj 0 60 50 0 999999999 "001"
    @cmd settextobj 1 60 60 1 999999999 "002"
    frame data/chars/0misc/empty.gif # 11
    @cmd updateframe getlocalvar("self") 11
    frame data/chars/0misc/empty.gif # 12
    frame data/chars/0misc/empty.gif # 13
    frame data/chars/0misc/empty.gif # 14
    frame data/chars/0misc/empty.gif # 15
    frame data/chars/0misc/empty.gif # 16
    frame data/chars/0misc/empty.gif # 17
    frame data/chars/0misc/empty.gif # 18
    frame data/chars/0misc/empty.gif # 19
    frame data/chars/0misc/empty.gif # 20
    frame data/chars/0misc/empty.gif # 21
    frame data/chars/0misc/empty.gif # 22
    frame data/chars/0misc/empty.gif # 23
    frame data/chars/0misc/empty.gif # 24
    frame data/chars/0misc/empty.gif # 25
    frame data/chars/0misc/empty.gif # 26
    frame data/chars/0misc/empty.gif # 27
    delay 2
    @cmd cleartextobj 0
    @cmd cleartextobj 1
    @cmd killentity getlocalvar("self")
    frame data/chars/0misc/empty.gif # 28
    frame data/chars/0misc/empty.gif # 29

update.c:
C:
void main()
{
    //SONG SELECTION IN THE PAUSE MENU ONLY IN THE THIRD GAME MODE
    if(openborvariant("in_titlescreen")){
        if(getglobalvar("menuPause") != 0){setglobalvar("menuPause", 0);}
    }

    //CHECK IF THE PLAYER IS IN THE THIRD GAME MODE
    if(openborvariant("in_level") && openborvariant("current_set") == 2){

        int volume        = openborvariant("effectvol");
        int speed        = 100;
        int loop        = 0;
        int menuPause    = getglobalvar("menuPause");
        int max            = 3;
        int min            = 0;
        int add            = 1;

        //CHECK IF THE GAME IS PAUSED BUT NOT IN OPTIONS
        if(openborvariant("game_paused") && !openborvariant("in_options")){

            //DETECT UP/DOWN BUTTON PRESS AND CHANGE THE HIGHLIGHTED OPTION
            if(    playerkeys(0, 1, "movedown")||
                playerkeys(1, 1, "movedown")||
                playerkeys(2, 1, "movedown")||
                playerkeys(3, 1, "movedown")){
              
                if(menuPause >= min && menuPause < max){setglobalvar("menuPause", menuPause+add);}
                if(menuPause == max){setglobalvar("menuPause", min);}
            }
            if(    playerkeys(0, 1, "moveup")||
                playerkeys(1, 1, "moveup")||
                playerkeys(2, 1, "moveup")||
                playerkeys(3, 1, "moveup")){
              
                if(menuPause > min && menuPause <= max){setglobalvar("menuPause", menuPause-add);}
                if(menuPause == min){setglobalvar("menuPause", max);}
            }

            //DEFINE A FUNCTION TO BE EXECUTED WHEN EACH OPTION IS CONFIRMED BY PRESSING ACTION KEYS
            //NOTE THAT SOME OPTIONS ALREADY PLAY SAMPLES NATIVELY, ONLY A FEW NEED TO BE MANUALLY PLAYED
            if(    playerkeys(0, 1, "anybutton")||
                playerkeys(1, 1, "anybutton")||
                playerkeys(2, 1, "anybutton")||
                playerkeys(3, 1, "anybutton")){
              
                //LOCK NATIVE KEYS
                changeplayerproperty(0, "newkeys", 0);
                changeplayerproperty(1, "newkeys", 0);
                changeplayerproperty(2, "newkeys", 0);
                changeplayerproperty(3, "newkeys", 0);

                //CONTINUE
                if(menuPause == 0){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                    //changeplayerproperty(0, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(1, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(2, "newkeys", openborconstant("FLAG_START"));
                    //changeplayerproperty(3, "newkeys", openborconstant("FLAG_START"));
                }

                //OPTIONS
                if(menuPause == 1){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    options();
                }

                //HOW TO PLAY
                /*
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    setglobalvar("menuPause", 0);
                    playgif("data/scenes/howto.gif");
                }
                */

              
                //SELECT MUSIC
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    //setglobalvar("menuPause", 0);
                    void vSpawn = spawn();
                    loadmodel("MusicSelect");
                    setspawnentry("name", "MusicSelect");
                }
              

                //END GAME
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }
            }

            //TEXTS, IMAGES AND EFFECTS
            void str;
            float hRes        = openborvariant("hresolution");
            int align;
            int yPos        = 80;
            int fontPause    = 3;
            int font0        = 0;
            int font1        = 0;
            int font2        = 0;
            int font3        = 0;
            int yAdd        = 11;
            int layer        = -1000000003;

            //DEFINE FONTS TO HIGHLIGHTED OPTIONS
            if(getglobalvar("menuPause") == 0){font0 = 1;}else    //IS CONTINUE HIGHLIGHTED??
            if(getglobalvar("menuPause") == 1){font1 = 1;}else    //IS OPTIONS HIGHLIGHTED??
            if(getglobalvar("menuPause") == 2){font2 = 1;}else    //IS SELECT MUSIC HIGHLIGHTED??
            if(getglobalvar("menuPause") == 3){font3 = 1;}        //IS END GAME HIGHLIGHTED??

            str = "Pause";align = (hRes-(strwidth(str, fontPause)))/2;
            drawstring(align, yPos, fontPause, str, layer);

            yPos = yPos+yAdd*3;
            str = "Continue";align = (hRes-(strwidth(str, font0)))/2;
            drawstring(align, yPos, font0, str, layer);

            yPos = yPos+yAdd;
            str = "Options";align = (hRes-(strwidth(str, font1)))/2;
            drawstring(align, yPos, font1, str, layer);

            yPos = yPos+yAdd;
            str = "Select Music";align = (hRes-(strwidth(str, font2)))/2;
            drawstring(align, yPos, font2, str, layer);

            yPos = yPos+yAdd;
            str = "End Game";align = (hRes-(strwidth(str, font3)))/2;
            drawstring(align, yPos, font3, str, layer);
        }

        //LOCK ACTION KEYS, NECESSARY STEP TO QUIT FROM THE OPTIONS IGNORING THE NATIVE "END GAME" OPTION
        if(openborvariant("game_paused") && openborvariant("in_options")){
            changeplayerproperty(0, "newkeys", 0);
            changeplayerproperty(1, "newkeys", 0);
            changeplayerproperty(2, "newkeys", 0);
            changeplayerproperty(3, "newkeys", 0);
        }

        //NECESSARY STEPS THAT NEED TO RUN AFTER SOME OPTIONS LIKE "END GAME" ARE CONFIRMED
        //THERE'S A FEW ENGINE FUNCTIONS THAT ONLY RUN OUTSIDE OF THE PAUSE MENU
        if(!openborvariant("game_paused") && !openborvariant("in_options")){

            //END GAME
            if(menuPause == 3){gameover();}
        }
    }
}

I don't like when I have to press any button on a different option, and then the escape button after. I want to press any button on that particular option like I do to any option in the pause menu. How can I achieve pressing any button effortlessly without requiring button combinations? The music menu is a text type entity.

8-4-2023 12-50-34 PM.png

FFp_demo_001 - 0012.png
 
Last edited:
I don't understand why it's not working at all.
@maxman Why are you putting the pausingGo() into an "if" condition? And it's not returning any result at the end too.

Another issue I have is that I'm trying to include a certain model as a music option or something else. And I have to press anybutton and then escape button, to look at the music menu. Sometimes, I press "anybutton", "start", and then "escape", just to look at it too. I removed playgif and (excluded) setglobalvar("menuPause", 0) from the 3rd option, so I could input the music menu as an option in the pause menu.
Are you trying to add another menu inside the pause menu?
 
@maxman Why are you putting the pausingGo() into an "if" condition? And it's not returning any result at the end too.
Whether I use it with or without "if" condition, it still doesn't work in my ROD only. I tried it both ways. However, for other mod(s) I try as my testing especially my SF mod, they do work well.

Are you trying to add another menu inside the pause menu?
Yes. I'm trying to make a new menu inside the pause menu. I saw a sample from your SOR mod, which has a command list option there. I wanted to try out something different with it other than just playgif.

I forgot to show that the highlighted menu text doesn't show in the pause menu. It happens sometimes.

I'm gonna send you my ROD mod for this issue when I have time.
 
Whether I use it with or without "if" condition, it still doesn't work in my ROD only. I tried it both ways. However, for other mod(s) I try as my testing especially my SF mod, they do work well.
I suggest to check the script.txt file inside the data folder and see if the alwaysupdate 1 is declared.

Yes. I'm trying to make a new menu inside the pause menu. I saw a sample from your SOR mod, which has a command list option there. I wanted to try out something different with it other than just playgif.
This will require a more complex script in order to adapt it for an additional menu, but certainly can be done. The demo I created is just a starting point and it's currently not prepared for additional menus.

I forgot to show that the highlighted menu text doesn't show in the pause menu. It happens sometimes.
Maybe due to the modifications, the BOR mod and SORX are using the same code and so far it didn't occur. But in case I find any bug I will update the demo file in the resource.
 
I suggest to check the script.txt file inside the data folder and see if the alwaysupdate 1 is declared.
It makes sense! I didn't realize alwaysupdate 1 is used. (I forgot about it too.) Now I know why it doesn't show. I'll make one. Thanks, man! 😁

This will require a more complex script in order to adapt it for an additional menu, but certainly can be done. The demo I created is just a starting point and it's currently not prepared for additional menus.
Wow! That would be complex to approach the kind of script, but I'd love to see some additional menus as a sample. That would be awesome (and complex?) to see.
 
Last edited:
I need to see the modifications you've made in the script to understand what's happening.
I was using a function name with the "if" condition as you said. I thought it worked because at that time, I didn't have script.txt and alwaysupdate 1 in my ROD mod. But, sometimes, when I tried my ROD, I couldn't move up and down with no highlighted text showing. Maybe I was wrong for saying it worked well. It does work too like without "if", but sometimes I find an error like that. I really need to dig deep for it, before I confirm.

EDIT: It seems the problem of no highlighted text lies around in the custom pause menu script itself. I'll PM you.
 
Last edited:
EDIT: It seems the problem of no highlighted text lies around in the custom pause menu script itself. I'll PM you.
@maxman
I don't know, it works fine in the BOR mod and SORX. In can consider a bug in the code in case you replicate it in the BOR template posted at the resources section.

Keep in mind that you have numerous possibilities of conflicts with other routines in your game, like the clearglobalvar() erasing variables or some duplicated variable using the same name as in the script. The engine version can affect it too (tested in the 6391), I suggest to confirm if there's any possible issue in these aspects.
 
I realized the real problem of this issue comes from my own edit. Is it okay if I can take the step-by-step process in replacing the how-to gif with something different? I wanna create some new options as a pause menu other than just how-to-play option, but that's beyond my knowledge to do advanced stuff.
 
@Kratus I took a look at your Partner Menu demo and the text menu for the partner looks nicely done. I want to try it out in one certain option under a pause menu. I see the pause menu is set in update.c while the partner menu is set in updated.c. I see certain globalvars are used in both global update scripts (update.c and updated.c), as well as keyall.c. How can I combine those two kinds of scripts into one? Should I use both update.c and updated.c? Should I use #import to those that are not global or something? I understand it's very advanced, but I'd like to know how to get that right. I know a little bit about using globalvars even though I have many globalvars in my SF mod.

Also, I plan to make a new pause menu only for training mode. I have it in update.c, but I would like to change the enemy type dummy into a player dummy, not an actual player. I could name that dummy from "Ryu" into "Ryu_DummyP" for instance.
 
How can I combine those two kinds of scripts into one?
Yes, you can use both inside the update.c but several changes may be required because I didn't develop them thinking about a future mix.
Maybe you can use a global variable as a flag to enable the partner menu inside the option menu according to a certain button press.
 
It's unbelievable for me that I increased the font option max from the pause menu script! This is my first time I added a new slot as an option to make it into 5 options in the pause menu. Even though I have failed to load/unload the helper in the pause menu from a certain game mode, I succeeded in adding a new slot in it. I can only summon the helper with the screenshot button fine.

I put this menuPartners() function in the new fourth slot here from update.c, but it doesn't show the partner menu itself after selecting it.
C:
                //SUMMON PARTNER TEST
                if(menuPause == 3){
                    menuPartners();
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }

8-31-2023 7-51-45 PM.png

EDIT: While I would like to enable the screenshot button to take shots, I want the partner menu to display only after you select the summon partner option in the pause menu. I already combined/mixed both scripts from the partner menu and the custom pause menu into both update.c and keyall.c. I just got it started. What should I do next after that?

EDIT 2: OK. I just figured out where the screenshot key was located, and it was in the menuPartners() function under keyall.c. I removed the screenshot player key out of it, so I added a menuPause globalvar inside the menuPartners() function (in a few parts). I succeeded in selecting the new option of calling a partner and it works as first/second step, but everytime I release any key, the partner menu appears again. When you hold or press one of the buttons, the partner menu disappears.

Here I added menuPause varname in keyall.c:
C:
void menuPartners(int player)
{//Adjust CPU partner mode and aggression
    void self        = getplayerproperty(player, "entity");
    int highlight    = getglobalvar("highlight");
    int hasplayed    = getplayerproperty(player, "hasplayed");
    int dir            = getentityproperty(self, "direction");
    int menuPause    = getglobalvar("menuPause");
    int max            = 6;
    int min            = 0;
    int add            = 1;
    float x            = getentityproperty(self, "x");
    float y            = getentityproperty(self, "y");
    float z            = getentityproperty(self, "z");

    //getglobalvar("menuPause") == 3
    // && getglobalvar("menuPause") == 3

    //MAIN COMMAND TO OPEN AND CLOSE PARTNER MENU
    if(hasplayed){ //SELECT BUTTON IS PRESSED??
        if(openborvariant("in_level")){ //CHECK IF THE GAME IS IN ANY LEVEL AND ARCADE LOCK IS "0"
            if(!openborvariant("pause") && !openborvariant("in_options")){ //CHECK IF THE GAME IS NOT PAUSED OR IN OPTIONS
                if(getglobalvar("activeText") == 0 && getglobalvar("menuPause") == 3){ //CHECK IF ANY MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 1); //LOCK PAUSE COMMAND
                    changeopenborvariant("textbox", 1); //CALL TEXTBOX TO FREEZE THE GAME
                    setglobalvar("highlight", 0); //SET TO THE FIRST HIGHLIGHTED OPTION
                    setglobalvar("activeText", "Partner"); //SET ACTIVE TEXT ON SCREEN TO "EXTRA MENU" TO ACTIVATE OTHER SCRIPTS
                }
                else
                if(getglobalvar("activeText") == "Partner" && getglobalvar("menuPause") == 3){ //CHECK IF EXTRA MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 0); //UNLOCK PAUSE COMMAND
                    changeopenborvariant("textbox", NULL()); //CLEAR TEXTBOX TO NOT FREEZE THE GAME
                    setglobalvar("highlight", 0); //RESET HIGHLIGHT VARIABLE TO DEFAULT
                    setglobalvar("activeText", 0); //SET ACTIVE TEXT ON SCREEN TO "0" TO DEACTIVATE OTHER SCRIPTS
                }
            }
        }
    }
  
    if(getglobalvar("activeText") == "Partner" && hasplayed){

        //HIGHLIGHT OPTIONS WHEN MOVE DOWN
        if(playerkeys(player, 1, "movedown")){
            playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
            if(highlight >= min && highlight < max){setglobalvar("highlight", highlight+add);}
            if(highlight == max){setglobalvar("highlight", min);}
        }
      
        //HIGHLIGHT OPTIONS WHEN MOVE UP
        if(playerkeys(player, 1, "moveup")){
            playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
            if(highlight > min && highlight <= max){setglobalvar("highlight", highlight-add);}
            if(highlight == min){setglobalvar("highlight", max);}
        }
      
        //CHANGE ALL OPTIONS INSIDE THIS MENU WHEN MOVE RIGHT
        if(playerkeys(player, 1, "moveright")){
            playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
          
            //IS PARTNER MODE HIGHLIGHTED??
            if(getglobalvar("highlight") == 0){
                if(getglobalvar("partnerMode") == "balanced"){setglobalvar("partnerMode", "attack");}else
                if(getglobalvar("partnerMode") == "attack"){setglobalvar("partnerMode", "defense");}else
                if(getglobalvar("partnerMode") == "defense"){setglobalvar("partnerMode", "balanced");}
            }
          
            //IS PARTNER AGGRESSION HIGHLIGHTED??
            if(getglobalvar("highlight") == 1){
                if(getglobalvar("partnerAggression") == "*"){setglobalvar("partnerAggression", "**");}else
                if(getglobalvar("partnerAggression") == "**"){setglobalvar("partnerAggression", "***");}else
                if(getglobalvar("partnerAggression") == "***"){setglobalvar("partnerAggression", "****");}else
                if(getglobalvar("partnerAggression") == "****"){setglobalvar("partnerAggression", "*****");}else
                if(getglobalvar("partnerAggression") == "*****"){setglobalvar("partnerAggression", "******");}else
                if(getglobalvar("partnerAggression") == "******"){setglobalvar("partnerAggression", "*******");}else
                if(getglobalvar("partnerAggression") == "*******"){setglobalvar("partnerAggression", "********");}else
                if(getglobalvar("partnerAggression") == "********"){setglobalvar("partnerAggression", "*********");}else
                if(getglobalvar("partnerAggression") == "*********"){setglobalvar("partnerAggression", "*");}
            }
          
            //IS PARTNER GET FOOD HIGHLIGHTED??
            if(getglobalvar("highlight") == 2){
                if(getglobalvar("partnerGetFood") == "yes"){setglobalvar("partnerGetFood", "no");}else
                if(getglobalvar("partnerGetFood") == "no"){setglobalvar("partnerGetFood", "yes");}
            }
          
            //IS PARTNER FOLLOW HIGHLIGHTED??
            if(getglobalvar("highlight") == 3){
                if(getglobalvar("partnerFollow") == "automatic"){setglobalvar("partnerFollow", "manual");}else
                if(getglobalvar("partnerFollow") == "manual"){setglobalvar("partnerFollow", "automatic");}
            }
          
            //IS PARTNER RESPAWN HIGHLIGHTED??
            if(getglobalvar("highlight") == 4){
                if(getglobalvar("partnerRespawn") == "instantly"){setglobalvar("partnerRespawn", "each_new_level");}else
                if(getglobalvar("partnerRespawn") == "each_new_level"){
                    if(getglobalvar("partnerAlive") == 0){setglobalvar("partnerIndex", NULL());}
                    setglobalvar("partnerRespawn", "instantly");
                }
            }

            //IS PARTNER LIFE BAR HIGHLIGHTED??
            if(getglobalvar("highlight") == 5){
                if(getglobalvar("partnerLifeBar") == "full_hud"){setglobalvar("partnerLifeBar", "simple");}else
                if(getglobalvar("partnerLifeBar") == "simple"){setglobalvar("partnerLifeBar", "full_hud");}
            }

            //IS PARTNER NAME HIGHLIGHTED??
            if(getglobalvar("highlight") == 6){
                if(getglobalvar("selectPartner") == "JoeNPC"){setglobalvar("selectPartner", "JoeNPC");}else
                if(getglobalvar("selectPartner") == "JoeNPC"){setglobalvar("selectPartner", "JoeNPC");}
            }
        }
      
        //CHANGE ALL OPTIONS INSIDE THIS MENU WHEN MOVE LEFT
        if(playerkeys(player, 1, "moveleft")){
            playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
          
            //IS PARTNER MODE HIGHLIGHTED??
            if(getglobalvar("highlight") == 0){
                if(getglobalvar("partnerMode") == "balanced"){setglobalvar("partnerMode", "defense");}else
                if(getglobalvar("partnerMode") == "defense"){setglobalvar("partnerMode", "attack");}else
                if(getglobalvar("partnerMode") == "attack"){setglobalvar("partnerMode", "balanced");}
            }
          
            //IS PARTNER AGGRESSION HIGHLIGHTED??
            if(getglobalvar("highlight") == 1){
                if(getglobalvar("partnerAggression") == "*"){setglobalvar("partnerAggression", "*********");}else
                if(getglobalvar("partnerAggression") == "*********"){setglobalvar("partnerAggression", "********");}else
                if(getglobalvar("partnerAggression") == "********"){setglobalvar("partnerAggression", "*******");}else
                if(getglobalvar("partnerAggression") == "*******"){setglobalvar("partnerAggression", "******");}else
                if(getglobalvar("partnerAggression") == "******"){setglobalvar("partnerAggression", "*****");}else
                if(getglobalvar("partnerAggression") == "*****"){setglobalvar("partnerAggression", "****");}else
                if(getglobalvar("partnerAggression") == "****"){setglobalvar("partnerAggression", "***");}else
                if(getglobalvar("partnerAggression") == "***"){setglobalvar("partnerAggression", "**");}else
                if(getglobalvar("partnerAggression") == "**"){setglobalvar("partnerAggression", "*");}
            }
          
            //IS PARTNER GET FOOD HIGHLIGHTED??
            if(getglobalvar("highlight") == 2){
                if(getglobalvar("partnerGetFood") == "yes"){setglobalvar("partnerGetFood", "no");}else
                if(getglobalvar("partnerGetFood") == "no"){setglobalvar("partnerGetFood", "yes");}
            }
          
            //IS PARTNER FOLLOW HIGHLIGHTED??
            if(getglobalvar("highlight") == 3){
                if(getglobalvar("partnerFollow") == "automatic"){setglobalvar("partnerFollow", "manual");}else
                if(getglobalvar("partnerFollow") == "manual"){setglobalvar("partnerFollow", "automatic");}
            }
          
            //IS PARTNER RESPAWN HIGHLIGHTED??
            if(getglobalvar("highlight") == 4){
                if(getglobalvar("partnerRespawn") == "instantly"){setglobalvar("partnerRespawn", "each_new_level");}else
                if(getglobalvar("partnerRespawn") == "each_new_level"){
                    if(getglobalvar("partnerAlive") == 0){setglobalvar("partnerIndex", NULL());}
                    setglobalvar("partnerRespawn", "instantly");
                }
            }

            //IS PARTNER LIFE BAR HIGHLIGHTED??
            if(getglobalvar("highlight") == 5){
                if(getglobalvar("partnerLifeBar") == "full_hud"){setglobalvar("partnerLifeBar", "simple");}else
                if(getglobalvar("partnerLifeBar") == "simple"){setglobalvar("partnerLifeBar", "full_hud");}
            }

            //IS PARTNER NAME HIGHLIGHTED??
            if(getglobalvar("highlight") == 6){
                if(getglobalvar("selectPartner") == "JoeNPC"){setglobalvar("selectPartner", "JoeNPC");}else
                if(getglobalvar("selectPartner") == "JoeNPC"){setglobalvar("selectPartner", "JoeNPC");}
            }
        }

        //SPAWN CPU PARTNER IN-GAME
        if(playerkeys(player, 1, "attack")){ //ATTACK BUTTON IS PRESSED??
            if(getglobalvar("highlight") == max){ //IS PARTNER SPAWN OPTION HIGHLIGHTED??
                if(getglobalvar("partnerIndex") == NULL()){ //ONLY 1 PARTNER IS ALLOWED
                    playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                  
                    //START THE SPAWN OPERATION
                    void vSpawn;
                    int height = 300;
                    loadmodel(getglobalvar("selectPartner"), 3);
                    clearspawnentry(); //CLEAR CURRENT SPAWN ENTRY
                    setspawnentry("name", getglobalvar("selectPartner")); //ACQUIRE SPAWN ENTITY BY NAME
                    vSpawn = spawn(); //SPAWN IN ENTITY
                    changeentityproperty(vSpawn, "position", x, z, y+height); //SET SPAWN POSITION
                    changeentityproperty(vSpawn, "direction", dir); //SET SPAWN DIRECTION
                    setglobalvar("highlight", 0); //RESET THE HIGHLIGHT OPTION
                    setglobalvar("partnerIndex", player); //SAVE THE CURRENT PARTNER "PARENT" INDEX
                    setglobalvar("currentPartner", vSpawn); //SAVE THE CURRENT PARTNER NAME
                    setglobalvar("partnerAlive", 1); //SET PARTNER'S ALIVE FLAG TO 1
                    setglobalvar("partnerFull", 0); //SET PARTNER'S FULL LIFE FLAG TO 0

                    //CLOSE PARTNER MENU INSTANTLY
                    if(getglobalvar("activeText") == "Partner"){ //CHECK IF EXTRA MENU IS ALREADY ON
                        playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                        changeopenborvariant("nojoin", 1); //PREVENT OTHER PLAYERS TO ENTER IN THE GAME
                        changeopenborvariant("nopause", 0); //UNLOCK PAUSE COMMAND
                        changeopenborvariant("textbox", NULL()); //CLEAR TEXTBOX TO NOT FREEZE THE GAME
                        setglobalvar("highlight", 0); //RESET HIGHLIGHT VARIABLE TO DEFAULT
                        setglobalvar("activeText", 0); //SET ACTIVE TEXT ON SCREEN TO "0" TO DEACTIVATE OTHER SCRIPTS
                    }
                }
            }
        }
    }
  
    //PARTNER CALL BUTTON AND CUSTOM PARROW USED IN ONDRAW.C AND THINK.C
    void player1 = getplayerproperty(0, "entity");
    void player2 = getplayerproperty(1, "entity");
    void player3 = getplayerproperty(2, "entity");
    void player4 = getplayerproperty(3, "entity");
  
    //USED TO MAKE THE SCRIPT WORKS WITH ANY PLAYER IN THE SCREEN AND WITH NO MENUS
    if(getglobalvar("activeText") == 0){
        if(playerkeys(player, 1, "attack4") && getglobalvar("partnerAlive") == 1){
          
            //USED TO CHANGE THE PARTNER INDEX IF THE CALLER IS DEAD
            if(getglobalvar("partnerIndex") == 0 && player1 == NULL()){
                if(player2 != NULL()){setglobalvar("partnerIndex", 1);}else
                if(player3 != NULL()){setglobalvar("partnerIndex", 2);}else
                if(player4 != NULL()){setglobalvar("partnerIndex", 3);}
            }
            if(getglobalvar("partnerIndex") == 1 && player2 == NULL()){
                if(player3 != NULL()){setglobalvar("partnerIndex", 2);}else
                if(player4 != NULL()){setglobalvar("partnerIndex", 3);}else
                if(player1 != NULL()){setglobalvar("partnerIndex", 0);}
            }
            if(getglobalvar("partnerIndex") == 2 && player3 == NULL()){
                if(player4 != NULL()){setglobalvar("partnerIndex", 3);}else
                if(player1 != NULL()){setglobalvar("partnerIndex", 0);}else
                if(player2 != NULL()){setglobalvar("partnerIndex", 1);}
            }
            if(getglobalvar("partnerIndex") == 3 && player4 == NULL()){
                if(player1 != NULL()){setglobalvar("partnerIndex", 0);}else
                if(player2 != NULL()){setglobalvar("partnerIndex", 1);}else
                if(player3 != NULL()){setglobalvar("partnerIndex", 2);}
            }
          
            //USED TO CALL PARTNER
            if(player == getglobalvar("partnerIndex")){
                if(getglobalvar("partnerParrow") != "call"){
                    playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    setglobalvar("partnerParrow", "call");
                }
                else
                {
                    playsample(openborconstant("SAMPLE_BEEP"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    setglobalvar("partnerParrow", NULL());
                }
            }
        }
    }
}

Yeah, I know I put getglobalvar("menuPause") == 3 in a few parts.
 
Last edited:
Yes, you can use both inside the update.c but several changes may be required because I didn't develop them thinking about a future mix.
Maybe you can use a global variable as a flag to enable the partner menu inside the option menu according to a certain button press.
I did mix them both and did use globalvar as a flag starting with the menuPause global varname. At least I'm at that step.

EDIT: Here is what I mean.

 
Last edited:
I just got the moving highlight in the partner menu solved a couple of minutes ago by adding one particular setglobalvar under a certain activeText globalvar. Now what's left is to exit the partner menu by pressing any button (without calling a partner). (I have to call a partner for getting out of the menu.)

This is what I have so far.
C:
//MAIN COMMAND TO OPEN AND CLOSE PARTNER MENU
    if(hasplayed && getglobalvar("menuPause") == 3){ // ACTIVATE PARTNER MENU AFTER SELECTING PARTNER MENU OPTION FROM PAUSE MENU
        if(openborvariant("in_level")){ //CHECK IF THE GAME IS IN ANY LEVEL AND ARCADE LOCK IS "0"
            if(hasplayed && !openborvariant("pause") && !openborvariant("in_options")){ //CHECK IF THE GAME IS NOT PAUSED OR IN OPTIONS
                if(getglobalvar("activeText") == 0){ //CHECK IF ANY MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 1); //LOCK PAUSE COMMAND
                    changeopenborvariant("textbox", 1); //CALL TEXTBOX TO FREEZE THE GAME
                    setglobalvar("highlight", 0); //SET TO THE FIRST HIGHLIGHTED OPTION
                    setglobalvar("activeText", "Partner"); //SET ACTIVE TEXT ON SCREEN TO "EXTRA MENU" TO ACTIVATE OTHER SCRIPTS
                    setglobalvar("menuPause", 0);
                }
                else
                if(getglobalvar("activeText") == "Partner"){ //CHECK IF EXTRA MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 0); //UNLOCK PAUSE COMMAND
                    changeopenborvariant("textbox", NULL()); //CLEAR TEXTBOX TO NOT FREEZE THE GAME
                    setglobalvar("highlight", 0); //RESET HIGHLIGHT VARIABLE TO DEFAULT
                    setglobalvar("activeText", 0); //SET ACTIVE TEXT ON SCREEN TO "0" TO DEACTIVATE OTHER SCRIPTS
                }
            }
        }
    }

In update.c, I just use this, and I don't need a necessary function for it like menuPartners().
C:
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }
 
Last edited:
Just got home from work an hour ago and started to rest. Then, I looked at my phone and viewed this page for an idea to unpause the partner menu. I got an unpaused exit from partner menu working, but I cannot summon a partner if I choose a spawn partner option with attack button. Yes, I use anybutton to exit. I think it's affecting the spawn partner option, doesn't it?

This is what I have so far.
C:
    //MAIN COMMAND TO OPEN AND CLOSE PARTNER MENU
    if(hasplayed){ // ACTIVATE PARTNER MENU AFTER SELECTING PARTNER MENU OPTION FROM PAUSE MENU
        if(openborvariant("in_level")){ //CHECK IF THE GAME IS IN ANY LEVEL AND ARCADE LOCK IS "0"
            if(hasplayed && !openborvariant("pause") && !openborvariant("in_options")){ //CHECK IF THE GAME IS NOT PAUSED OR IN OPTIONS
                if(getglobalvar("activeText") == 0 && getglobalvar("menuPause") == 3){ //CHECK IF ANY MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 1); //LOCK PAUSE COMMAND
                    changeopenborvariant("textbox", 1); //CALL TEXTBOX TO FREEZE THE GAME
                    setglobalvar("highlight", 0); //SET TO THE FIRST HIGHLIGHTED OPTION
                    setglobalvar("activeText", "Partner"); //SET ACTIVE TEXT ON SCREEN TO "EXTRA MENU" TO ACTIVATE OTHER SCRIPTS
                    setglobalvar("menuPause", 0);
                }
                else
                if(getglobalvar("activeText") == "Partner" && playerkeys(player, 1, "anybutton")){ //CHECK IF EXTRA MENU IS ALREADY ON
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, openborvariant("effectvol"), openborvariant("effectvol"), 100, 0); //PLAY SAMPLE
                    changeopenborvariant("nopause", 0); //UNLOCK PAUSE COMMAND
                    changeopenborvariant("textbox", NULL()); //CLEAR TEXTBOX TO NOT FREEZE THE GAME
                    setglobalvar("highlight", 0); //RESET HIGHLIGHT VARIABLE TO DEFAULT
                    setglobalvar("activeText", 0); //SET ACTIVE TEXT ON SCREEN TO "0" TO DEACTIVATE OTHER SCRIPTS
                }
            }
        }
    }

What seems to be wrong with it?

EDIT: As of now, I replaced "anybutton" with "attack2" command for exiting the partner menu, just to give room for the "attack" command to spawn a partner. I would like to know how I could have the "anybutton" command to accept the first six options in the partner menu for exiting, leaving only the "attack" command on the Spawn Partner option.
 
Last edited:
@maxman Sorry, I was out these days and didn't enter the forum. I'm reading all the messages and will take a look at your codes soon, it seems that you made good progress so far.
 
I'm sticking with the attack2 command for now. I don't wanna sound rude or greedy, but I'm still waiting for an answer on how I can create a press of anybutton to the first six out of seven options. :)

@maxman Sorry, I was out these days and didn't enter the forum. I'm reading all the messages and will take a look at your codes soon, it seems that you made good progress so far.
Thank you, Kratus. With this shot, there is no conflict with the screenshot button since I enabled it and fixed the exit from the partner menu. Still, every time I press any button to select the partner option, the player starts to act in less than a second before the partner menu displays. :) It seems the engine is always quick to detect keys before any event happens. I think @DCurrent mentioned the following script events in order. I forgot what the event order is, but I remember keyscript being the first in order. I'll go search around here.

ROD MAXED OUT! - 0005.png

I'm creating a new menu system based on the mix of scripts (both partner and pause) I created. I'm attempting to make a different one. And yes, like you said, this requires me to make plenty changes for unique menus.

Music playlist script. (Custom)

Thanks to your sample scripts, I can change the menus to whatever I want though it's challenging.
 
Last edited:
It seems the engine is always quick to detect keys before any event happens
Yeah, the update.c works in this way, this is why I'm using it in the pause menu canceling key presses when it's necessary.

EDIT: As of now, I replaced "anybutton" with "attack2" command for exiting the partner menu, just to give room for the "attack" command to spawn a partner. I would like to know how I could have the "anybutton" command to accept the first six options in the partner menu for exiting, leaving only the "attack" command on the Spawn Partner option.
I think that mixing both menus made it more complicated, in this case I suggest moving the partner spawn function to a single-shot keyscript and left the pause menu only to adjust parameters like entity name, aggression and other things.
This way you will not need the attack keys or anybutton in the menu to spawn partners, just detect directional keys to change options.
 
I think that mixing both menus made it more complicated, in this case I suggest moving the partner spawn function to a single-shot keyscript and left the pause menu only to adjust parameters like entity name, aggression and other things.
This way you will not need the attack keys or anybutton in the menu to spawn partners, just detect directional keys to change options.
I should've shown a sample of what I meant here earlier.

ROD MAXED OUT! - 0005 button menu sample.png

I added a few more NPC's and changed its Spawn Partner parameter/option as a test last night. It was easy.

ROD MAXED OUT! - 0006.pngROD MAXED OUT! - 0007.png
 
Back
Top Bottom