Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help please with this very easy code
#7
Code:
' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 15
Public Const MAX_MAPY As Byte = 11
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1
Public Const MAX_MORAL_COLA As Byte = 2

Here is where i placed it in the map constants client side.

Code:
' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 15
Public Const MAX_MAPY As Byte = 11
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1
Public Const MAX_MORAL_COLA As Byte = 2

Here is where i placed it in the server constants client side.

Code:
Public Sub UpdateDrawMapName()
    DrawMapNameX = (MAX_MAPX + 1) * PIC_X \ 2 - ((Len(Trim$(Map.Name)) \ 2) * 8)
    DrawMapNameY = 1
    
    Select Case Map.Moral
        Case MAP_MORAL_NONE
            DrawMapNameColor = QBColor(BrightRed)
            
        Case MAP_MORAL_SAFE
            DrawMapNameColor = QBColor(White)
        
        Case MAP_MORAL_COLA
            DrawMapNameColor = QBColor(Blue)
        
        Case Else
            DrawMapNameColor = QBColor(White)
    End Select
    
End Sub

This is what i have in game logic client side.

Also, if the game knows about the morale, where do you tell the program what the morale does? I would like the question answered becasue if you add anything new say a new layer or spell thing, or map attribute, where do you tell the program what it does you know what i mean?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)