telewizor Posted March 17, 2011 Author Share Posted March 17, 2011 Hello, in this tutorial i will show you how to make chat as on this screen:http://www.imagebanana.com/view/4dwnoj93/nowychat.pngSo let's start:Add new variables in modGlobals:```Public Linijka(0 To 4) As StringPublic LinijkaCol(0 To 4) As Long```In mod DirectDraw7 above:``` For i = 1 To MAX_BYTE Call BltActionMsg(i) Next i```Add:``` For i = 0 To 4 Call DrawChat(i) Next i```In modText above **Public Function BltMapAttributes()** add this:```Public Sub DrawChat(ByVal i As Byte)Dim x, y As Longx = Camera.Left + 4y = Camera.Top + 445 + (i * 15) Call DrawText(TexthDC, x, y, Linijka(i), LinijkaCol(i)) End Sub```in modText too, find **Public Sub AddText** and in this Sub, under:``` frmMainGame.txtChat.SelStart = Len(frmMainGame.txtChat.text) - 1```Add:``` For i = 0 To 4 If Linijka(i) = "" Then Linijka(i) = Msg LinijkaCol(i) = QBColor(color) i = 4 Else If i = 4 Then Linijka(0) = Linijka(1) LinijkaCol(0) = LinijkaCol(1) Linijka(1) = Linijka(2) LinijkaCol(1) = LinijkaCol(2) Linijka(2) = Linijka(3) LinijkaCol(2) = LinijkaCol(3) Linijka(3) = Linijka(4) LinijkaCol(3) = LinijkaCol(4) Linijka(4) = Msg LinijkaCol(4) = QBColor(color) End If End If Next```Next, in modHandleData, find **Private Sub HandleSayMsg** and under **frmMainGame.txtChat.SelStart = Len(frmMainGame.txtChat.text) - 1**Add:``` For i = 0 To 4 If Linijka(i) = "" Then Linijka(i) = vbNewLine & Header & Name & ": " & message LinijkaCol(i) = colour i = 4 Else If i = 4 Then Linijka(0) = Linijka(1) LinijkaCol(0) = LinijkaCol(1) Linijka(1) = Linijka(2) LinijkaCol(1) = LinijkaCol(2) Linijka(2) = Linijka(3) LinijkaCol(2) = LinijkaCol(3) Linijka(3) = Linijka(4) LinijkaCol(3) = LinijkaCol(4) Linijka(4) = vbNewLine & Header & Name & ": " & message LinijkaCol(4) = colour End If End If Next```That's all, i hope that this will working :D'linijka' mean 'line' in polishgreetingsPS Sorry for my english ;) Link to comment Share on other sites More sharing options...
The New World Posted March 17, 2011 Share Posted March 17, 2011 Does 'Linijka' stand for 'line'? Link to comment Share on other sites More sharing options...
telewizor Posted March 17, 2011 Author Share Posted March 17, 2011 yes, 'linijka' mean 'line' in polish Link to comment Share on other sites More sharing options...
The New World Posted March 17, 2011 Share Posted March 17, 2011 You may want to add that to your OP for us English people. :) Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 17, 2011 Share Posted March 17, 2011 English would make the Ryoku Happy XD lol Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 18, 2011 Share Posted March 18, 2011 So linijka just needs to be changed to line for english speaking people. Also Why 0 - 4? are you only allowing up to 5 lines of chat be on the map at a time? Link to comment Share on other sites More sharing options...
Ice - Fire Posted March 18, 2011 Share Posted March 18, 2011 If your going to do this, adding a semi transparent background to enhance the texts visibility is a must, otherwise a lot of people are going to find it hard to read. Yours truly, Ice Link to comment Share on other sites More sharing options...
telewizor Posted March 19, 2011 Author Share Posted March 19, 2011 Ice, you're right, I don't have this problem in my game, because i have text outline so it's easy to read(this can be seen on screen in 1st post).crazyone - yes, it allowing up to 5lines of chat but you can simply change this. Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 19, 2011 Share Posted March 19, 2011 Alrighty kool. I might start using that. And for what ice was stating you should show how to do this for people who don't know how to have a transparent background… Link to comment Share on other sites More sharing options...
BugSICK Posted March 27, 2011 Share Posted March 27, 2011 any farther comment on this thread? cant try it right now. :sad: Link to comment Share on other sites More sharing options...
Knuckles Posted July 2, 2011 Share Posted July 2, 2011 it doesnt worki tried twice but i still got error>! ![](http://i52.tinypic.com/2lmlaja.png) Link to comment Share on other sites More sharing options...
jcsnider Posted July 2, 2011 Share Posted July 2, 2011 Under DIm S as stringputDim i as long Link to comment Share on other sites More sharing options...
Knuckles Posted July 2, 2011 Share Posted July 2, 2011 i still have the same error Link to comment Share on other sites More sharing options...
evilbunnie Posted July 2, 2011 Share Posted July 2, 2011 @Knuckles:> i still have the same errorYou obviously have not done it right.Do again what jcsnider told you to do. Send another screenshot if it does not work. Link to comment Share on other sites More sharing options...
Knuckles Posted July 3, 2011 Share Posted July 3, 2011 i did but i still have the same mistake Link to comment Share on other sites More sharing options...
Connor Posted July 3, 2011 Share Posted July 3, 2011 Mine doesn't have this part..``` For i = 1 To MAX_BYTE Call BltActionMsg(i) Next i```I've searched everywhere in modDirectDraw7.Any help? :) Link to comment Share on other sites More sharing options...
evilbunnie Posted July 3, 2011 Share Posted July 3, 2011 @Connor:> Mine doesn't have this part..> ```> For i = 1 To MAX_BYTE> Call BltActionMsg(i)> Next i> > ```> I've searched everywhere in modDirectDraw7.> Any help? :)What engine are you using? Use Ctrl+F and then check Current Project.@Knuckles:> i did but i still have the same mistakeScreenshot your source please. Link to comment Share on other sites More sharing options...
Knuckles Posted July 3, 2011 Share Posted July 3, 2011 http://i52.tinypic.com/2lmlaja.png Link to comment Share on other sites More sharing options...
jcsnider Posted July 3, 2011 Share Posted July 3, 2011 @jcsnider:> Under DIm S as string> > put> > Dim i as long Link to comment Share on other sites More sharing options...
Knuckles Posted July 3, 2011 Share Posted July 3, 2011 i already did it :( Link to comment Share on other sites More sharing options...
jcsnider Posted July 3, 2011 Share Posted July 3, 2011 No, you did not. In your picture you did NOT add, "Dim i as long" after "Dim S as string". It is not there. Link to comment Share on other sites More sharing options...
Knuckles Posted July 4, 2011 Share Posted July 4, 2011 i added after i took that pic. but it doesnt work. Link to comment Share on other sites More sharing options...
jcsnider Posted July 4, 2011 Share Posted July 4, 2011 Then re-post the pic with the error.WITH the change. Link to comment Share on other sites More sharing options...
Knuckles Posted July 4, 2011 Share Posted July 4, 2011 oh wait. i made a mistake. because i couldnt find this For i = 1 To MAX_BYTE Call BltActionMsg(i) Next i Link to comment Share on other sites More sharing options...
aaaron Posted July 4, 2011 Share Posted July 4, 2011 I added in this, but it's not drawing to picScreen. :/ 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