Mirage Source
[Feature] On screen stats (Easy) - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13)
+------ Thread: [Feature] On screen stats (Easy) (/showthread.php?tid=2889)



[Feature] On screen stats (Easy) - Egon - 28-06-2009

[spoiler]Client Side Only
Find:
Code:
' Checking fps
                Case "/fps"
                    BFPS = Not BFPS
Under Add:
Code:
' Checking Stats
                Case "/vital"
                    Vital = Not Vital
Find:
Code:
Public BFPS As Boolean ' FPS
Under Add:
Code:
Public Vital As Boolean ' Stats
Find:
Code:
' draw FPS
        If BFPS Then
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 4, 1, Trim$("FPS: " & GameFPS), QBColor(Yellow))
        End If
Under Add:
If you want numbers like 14/14
Code:
' draw Stats
        If Vital Then
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 335, Trim$("HP: " & GetPlayerVital(MyIndex, Vitals.HP) & "/" & GetPlayerMaxVital(MyIndex, Vitals.HP)), QBColor(Red)) 'HP
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 350, Trim$("MP: " & GetPlayerVital(MyIndex, Vitals.MP) & "/" & GetPlayerMaxVital(MyIndex, Vitals.MP)), QBColor(Blue)) 'MP
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 365, Trim$("SP: " & GetPlayerVital(MyIndex, Vitals.SP) & "/" & GetPlayerMaxVital(MyIndex, Vitals.SP)), QBColor(Yellow)) 'SP
        End If
If you want percents Add:
Code:
' draw Stats
        If Vital Then
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 335, Trim$("HP: " & frmMirage.lblHP.Caption), QBColor(Red)) 'HP
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 350, Trim$("MP: " & frmMirage.lblMP.Caption), QBColor(Blue)) 'MP
            Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X - 440, 365, Trim$("SP: " & frmMirage.lblSP.Caption), QBColor(Yellow)) 'SP
        End If
[/spoiler][Image: vitalp.png]


Re: [Feature] On screen stats (Easy) - Jack - 07-07-2009

I like the new version of doing it much easier to read and understand, making it horiontal would be better i think, But that shouldn't be to hard to figure out when placing this in. Nice work mate, Keep it up Egon.


Re: [Feature] On screen stats (Easy) - Egon - 08-07-2009

You can play with the 440 and 300 numbers then.