Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hp/Mp Bars Fucked up
#1
[Image: 2004729557467268187_th.jpg]
^ Pic

\/ code
Code:
' ::::::::::::::::::::::
    ' :: Player hp packet ::
    ' ::::::::::::::::::::::
    If LCase(Parse(0)) = "playerhp" Then
        Player(MyIndex).MaxHP = Val(Parse(1))
        Call SetPlayerHP(MyIndex, Val(Parse(2)))
        If GetPlayerMaxHP(MyIndex) > 0 Then
            'frmMainGame.lblHP.Caption = Int(GetPlayerHP(MyIndex) / GetPlayerMaxHP(MyIndex) * 100) & "%"
            [b]frmMainGame.picHP.Width = ((GetPlayerHP(MyIndex) / 256) / (GetPlayerMaxHP(MyIndex) / 256)) * 256[/b]
        End If
        Exit Sub
    End If

    ' ::::::::::::::::::::::
    ' :: Player mp packet ::
    ' ::::::::::::::::::::::
    If LCase(Parse(0)) = "playermp" Then
        Player(MyIndex).MaxMP = Val(Parse(1))
        Call SetPlayerMP(MyIndex, Val(Parse(2)))
        If GetPlayerMaxMP(MyIndex) > 0 Then
            'frmMainGame.lblMP.Caption = Int(GetPlayerMP(MyIndex) / GetPlayerMaxMP(MyIndex) * 100) & "%"
            [b]frmMainGame.PicMP.Width = ((GetPlayerMP(MyIndex) / 256) / (GetPlayerMaxMP(MyIndex) / 256)) * 256[/b]
        End If
        Exit Sub
    End If


Do you see anything in the code that might lead to this? I did the math myself and it works out nice but it's all messed up in the GUI...

Pay no attention to the horrid GUI that is just for test :lol:
Reply
#2
Add a:

Code:
* screen.twipsperpixelx

at the end?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#3
Do you have like the answer to everything?!?! Thank you.
Reply
#4
Yes.

Yes I do.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#5
Yeah, but I'd know the problem anyway as it's obvious that bar is 1/15 of what it should be.

Plus, I get a lot of people asking me about this. Tongue
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)