01-06-2006, 09:19 PM
Author: Dark Dragon
Difficulty: 1/5
By adding this tutorial, player names will not be displayed unless you hover your mouse over them.
In frmMirage, change Private Sub picScreen_MouseMove to:This change sets the CurX and CurY values (which will be added in a little bit) to the tile you are hovering over.
In modGameLogic, under:Add:This sets the CurX and CurY variables.
Now, in Sub Gameloop, change:
To:All done!
Difficulty: 1/5
By adding this tutorial, player names will not be displayed unless you hover your mouse over them.
In frmMirage, change Private Sub picScreen_MouseMove to:
Code:
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
In modGameLogic, under:
Code:
' Game fps
Public GameFPS As Long
Code:
'Loc of pointer
Public CurX As Integer
Public CurY As Integer
Now, in Sub Gameloop, change:
Code:
' 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
Code:
' 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