Originally posted by Dark Dragon
Name: No Names unless Hovered Over By: Dark//Dragon Difficulty: 1/5
What it Will Do: By Adding this tutorial, peoples names will not be Blitted unless you hover you're mouse over them.
All Client Side
++++++++++ frmMirage ++++++++++
Change the private sub picScreen Mouse move to:
Private Sub picScreen_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Call EditorMouseDown(Button, Shift, x, y) CurX = Int(x / PIC_X) CurY = Int(y / PIC_Y)
End Sub
this change sets the CurX and CurY Values (we will add these variables later =) ) to the tile you are hovering over.
++++++++++ modGameLogic.bas ++++++++++
at the top under
' Game fps Public GameFPS As Long
add
'Loc of pointer Public CurX As Integer Public CurY As Integer
this ads the Cur X and Y variables.
now in sub gameloop, change
' Lock the backbuffer so we can draw text and names TexthDC = DD_BackBuffer.GetDC For I = 1 To MAX_PLAYERS If IsPlaying(I) And GetPlayerMap(I) = GetPlayerMap(MyIndex) Then Call BltPlayerName(I) End If Next I
to
' Lock the backbuffer so we can draw text and names TexthDC = DD_BackBuffer.GetDC For I = 1 To MAX_PLAYERS If IsPlaying(I) And GetPlayerMap(I) = GetPlayerMap(MyIndex) Then If Player(I).x = CurX And Player(I).y = CurY Then Call BltPlayerName(I) End If End If Next I
now you should be all set... !
ya i know its simple, but it might help somebody new.. :wink:
|