Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I get a BattleMsg to the topleft?
#1
I'm really not too sure on this, I copied a Call from
Code:
'Draw map name
and tried to edit that.. But it didn't work.

Edit: Also, how would I made it global so everyone'll see it?
Reply
#2
Define.. Battle message.
Reply
#3
It's the message you get on the actual map.
Reply
#4
Code:
Dim MSG as String

Call DrawText(TexthDC, (1 * PIC_X) + 4, (1* PIC_Y) + 12, MSG, QBColor(BrightRed))

That should be the top left.. ish.

I can't remember if it counts from 0 or 1 for tiles. .XD


In any case, just make MSG = whatever you want blitted there.
Reply
#5
I think it starts at 0.

And this is what I've got so far.
Code:
If GetPlayerAccess(Index) > 0 Then
                Call AddLog("[" & GetPlayerName(Index) & "]:" & MSG, ADMIN_LOG)
                Call BattleMsg(Index, "***", Yellow, 0)
                Call AdminMsg("[" & GetPlayerName(Index) & "]:" & MSG, AdminColor)
            End If
I just want that BattleMsg to be in the top left for however long a normal BattleMsg is and for everyone to be able to see it.
Reply
#6
What's in the "BattleMsg" sub?
Reply
#7
Code:
Sub BattleMsg(ByVal Index As Long, ByVal MSG As String, ByVal Color As Byte, ByVal Side As Long)
    Call SendDataTo(Index, "damagedisplay" & SEP_CHAR & Side & SEP_CHAR & MSG & SEP_CHAR & Color & SEP_CHAR & END_CHAR)
End Sub
Reply
#8
Client side, whatever you have to recieve the "damagedisplay" packet, set a timer variable to whatever you want.

Like.. Timer = 15

Then in the Gameloop add


Code:
If Timer > 0 Then
      Call Drawtext(blah blah blah)
End If
Reply
#9
Actualy, I'm going to try something that just popped into my head. If it doesn't work, I'll try the timer.
Reply
#10
Ok, new idea, lets forget the BattleMsg.

Say if I was to make a lable on the picScreen and whenever a person with the access of greater then one uses the "@" command it would show a caption and then go away two seconds later.

This seems much easyer.
Reply
#11
Duplicate the Broadcast crap, but make the receiving packet make lblWhatever.Caption = Packet
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)