minipimp Posted February 10, 2009 Author Share Posted February 10, 2009 Is there a way i could enable the visibility of the Players hp bar to everyone, so everyone can see it ? i have been searching and i think it may have something to do with BltPlayerBars. im not sure at all and I hope i gave enough information for my question. If anyone could please help me that would be great. Link to comment Share on other sites More sharing options...
Drag0n Posted February 10, 2009 Share Posted February 10, 2009 It's in source like you said.Look there and find something to change.Shouldn't be very hard. Link to comment Share on other sites More sharing options...
minipimp Posted February 10, 2009 Author Share Posted February 10, 2009 K thanks Link to comment Share on other sites More sharing options...
Drag0n Posted February 10, 2009 Share Posted February 10, 2009 Welcome. Link to comment Share on other sites More sharing options...
minipimp Posted February 16, 2009 Author Share Posted February 16, 2009 i have this working but it has a bug or something , the actual players health is not on the hp bar , all it is is the red back.```Sub BltPlayerBars(ByVal Index As Long) Dim X As Long, y As Long X = (GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset) - (NewPlayerX * PIC_X) - NewXOffset y = (GetPlayerY(Index) * PIC_Y + sx + Player(Index).yOffset) - (NewPlayerY * PIC_Y) - NewYOffset If Player(Index).HP = 1 Then Exit Sub End If If SpriteSize = 1 Then ' draws the back bars Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0)) Call DD_BackBuffer.DrawBox(X, y - 30, X + 32, y - 34) ' draws HP Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0)) Call DD_BackBuffer.DrawBox(X, y - 30, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 34) Else If SpriteSize = 2 Then ' draws the back bars Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0)) Call DD_BackBuffer.DrawBox(X, y - 30 - PIC_Y, X + 32, y - 34 - PIC_Y) ' draws HP Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0)) Call DD_BackBuffer.DrawBox(X, y - 30 - PIC_Y, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 34 - PIC_Y) Else ' draws the back bars Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0)) Call DD_BackBuffer.DrawBox(X, y + 2, X + 32, y - 2) ' draws HP Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0)) Call DD_BackBuffer.DrawBox(X, y + 2, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 2) End If End IfEnd Sub```Is there anything wrong with it? Link to comment Share on other sites More sharing options...
Drag0n Posted February 16, 2009 Share Posted February 16, 2009 @Sâ–ÂIâ–ÂNâ–ÂNâ–ÂIâ–ÂX:> ```> Sub BltPlayerBars(ByVal Index As Long)> Dim X As Long, y As Long> > X = (GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset) - (NewPlayerX * PIC_X) - NewXOffset> y = (GetPlayerY(Index) * PIC_Y + sx + Player(Index).yOffset) - (NewPlayerY * PIC_Y) - NewYOffset> > If Player(Index).HP = 1 Then> Exit Sub> End If> If SpriteSize = 1 Then> ' draws the back bars> Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))> Call DD_BackBuffer.DrawBox(X, y - 30, X + 32, y - 34)> > ' draws HP> Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0))> Call DD_BackBuffer.DrawBox(X, y - 30, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 34)> Else> If SpriteSize = 2 Then> ' draws the back bars> Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))> Call DD_BackBuffer.DrawBox(X, y - 30 - PIC_Y, X + 32, y - 34 - PIC_Y)> > ' draws HP> Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0))> Call DD_BackBuffer.DrawBox(X, y - 30 - PIC_Y, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 34 - PIC_Y)> Else> ' draws the back bars> Call DD_BackBuffer.SetFillColor(RGB(255, 0, 0))> Call DD_BackBuffer.DrawBox(X, y + 2, X + 32, y - 2)> > ' draws HP> Call DD_BackBuffer.SetFillColor(RGB(0, 255, 0))> Call DD_BackBuffer.DrawBox(X, y + 2, X + ((Player(Index).HP / 100) / (Player(Index).MaxHp / 100) * 32), y - 2)> End If> End If> End Sub> ```That's nice coding! But, what's with the If SpriteSize = 1?Other than that I don't see much of a problem.. Link to comment Share on other sites More sharing options...
Drag0n Posted February 16, 2009 Share Posted February 16, 2009 Ok. Yeah, sorry I can't help much more..;) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now