Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to make damage look different


turbocookie
 Share

Recommended Posts

@turbocookie:

> how do i make the damage above the players names to be like bublble writing ones? do i have to make a picture for each number and then edit some script?
>
> someone please help

Ignore McNugget, he's an idiot.

The chat bubble system is actually a very poorly designed tiling system which would be difficult to port over to damage, especially if you have no programming experience.
Link to comment
Share on other sites

Gonna take this a different route. You said "bubble writing", so I assume you mean using a different style font. If you actually did mean to use something like the chat bubble system, see above.

Currently, the font in Eclipse is universal. That is, you can't change one without changing all the others, at least not in a simple, one-edit format. The damage is handled via DrawText and the font is done via SetFont, shown below:

```
Public Sub SetFont(ByVal Font As String, ByVal Size As Byte)
    GameFont = CreateFont(Size, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Font)
End Sub

Public Sub DrawText(ByVal hDC As Long, ByVal X, ByVal Y, ByVal Text As String, color As Long)
    Call SelectObject(hDC, GameFont)
    Call SetBkMode(hDC, vbTransparent)
    Call SetTextColor(hDC, RGB(0, 0, 0))
    Call TextOut(hDC, X + 1, Y + 0, Text, Len(Text))
    Call TextOut(hDC, X + 0, Y + 1, Text, Len(Text))
    Call TextOut(hDC, X - 1, Y - 0, Text, Len(Text))
    Call TextOut(hDC, X - 0, Y - 1, Text, Len(Text))
    Call SetTextColor(hDC, color)
    Call TextOut(hDC, X, Y, Text, Len(Text))
End Sub
```
Now, if you'll notice, GameFont is the only font style used when drawing text. You'd have to make a separate function, or some kind of conditional, to make this work. A simple copy and paste would work, but you'd have to change all the damage displays to match.

```
Public Sub SetFont2(ByVal Font As String, ByVal Size As Byte)
    GameFont2 = CreateFont(Size, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Font)
End Sub

Public Sub DrawText2(ByVal hDC As Long, ByVal X, ByVal Y, ByVal Text As String, color As Long)
    Call SelectObject(hDC, GameFont2)
    Call SetBkMode(hDC, vbTransparent)
    Call SetTextColor(hDC, RGB(0, 0, 0))
    Call TextOut(hDC, X + 1, Y + 0, Text, Len(Text))
    Call TextOut(hDC, X + 0, Y + 1, Text, Len(Text))
    Call TextOut(hDC, X - 1, Y - 0, Text, Len(Text))
    Call TextOut(hDC, X - 0, Y - 1, Text, Len(Text))
    Call SetTextColor(hDC, color)
    Call TextOut(hDC, X, Y, Text, Len(Text))
End Sub
```
With this, all the damage displays could use a second font variable, GameFont2, which you could change to whatever you wanted, etc. etc.

If that was far from what you wanted, woops.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...