Solved Check for a Numeral in Complete Screen

Question that is answered or resolved.

maxman

Well-known member
I copied one line from translation.txt with this line, but not the one "msgid" since I want to bother with the complete screen: msgid "Stage %i Complete!"

But when I added this in updated.c, it only reads the letter "I" in it.

C:
    if(openborvariant("in_showcomplete")){

        void mStyle = getglobalvar("musicStyle");
        int font = 3;
        float hRes    = openborvariant("hresolution");
        float vRes    = openborvariant("vresolution");

        if(mStyle == 0){font = 4;}
        if(mStyle == 1){font = 6;}
        if(mStyle == 2){font = 5;}

        drawstring((hRes-strwidth("Stage %i Complete!", font))/2, 20, font, "Stage %i Complete!", 600000);
        
        //CHECK THE CURRENT MUSIC TO PLAY IT ONCE
        if(getglobalvar("musicPlaying") != "finish.bor"){
            musicFinish();
        }
    }

How can I give a check to a numeric form in script when it comes to "Stage # Complete" every time next is used? So far, I only have this "i%", which only reads letter I.

ROD MAXED OUT! - 0163.pngROD MAXED OUT! - 0164.png
 
Solution
Never mind. I just found an answer by just adding "current_stage" of openborvariant. This is one of them from the manual.

openborvariant(varname)

  • Return a openbor variant by name.
  • Names available:
    • "current_stage", - Stage index of current set, start from 1.

I don't have to post everything from updated.c here since it has plenty scripts on mine. I added spaces in the text part since I'm not using settextobj.
Code:
        void mStyle = getglobalvar("musicStyle");
        int font = 3;
        float hRes    = openborvariant("hresolution");
        int StageNum = openborvariant("current_stage");

        if(mStyle == 0){font = 4;}
        if(mStyle == 1){font = 6;}
        if(mStyle == 2){font = 5;}...
Never mind. I just found an answer by just adding "current_stage" of openborvariant. This is one of them from the manual.

openborvariant(varname)

  • Return a openbor variant by name.
  • Names available:
    • "current_stage", - Stage index of current set, start from 1.

I don't have to post everything from updated.c here since it has plenty scripts on mine. I added spaces in the text part since I'm not using settextobj.
Code:
        void mStyle = getglobalvar("musicStyle");
        int font = 3;
        float hRes    = openborvariant("hresolution");
        int StageNum = openborvariant("current_stage");

        if(mStyle == 0){font = 4;}
        if(mStyle == 1){font = 6;}
        if(mStyle == 2){font = 5;}

        drawstring((hRes-strwidth("Stage "+StageNum+" Complete!", font))/2, 80, font, "Stage "+StageNum+" Complete!", 600000);

This works nicely as I wanted and expected.

ROD MAXED OUT! - 0167.png
 
Last edited:
Solution
Back
Top Bottom