Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Overhead Damage
#26
Fix what.. It does work perfectly lol
Reply
#27
Well even if it does work perfectly... you don't need the

' Variables
Public NewPlayerX As Long
Public NewPlayerY As Long
Public NewXOffset As Long
Public NewYOffset As Long
Public NewX As Long
Public NewY As Long
Public sx as Long


those were all variables from elysium... used in GSD's scrolling map system, the reason that i even bothered to set those was because when i wrote the original tutorial i was too lazy to go through and remove all of the variables, i just had you declare them instead.
Reply
#28
Thank you for the tutorial. If you ever want to improve it, might i suggest...

- If the creature has a instant re spawn time, then the damage can still be seen when they re spawn.
- Damage should start a little closer to the creatures... Not so far up.
Reply
#29
This is over a year old and the OP doesn't frequent the forums anymore...
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#30
Ilovelamp wrote it.
Reply
#31
Since when did Sean frequent the forums?

He drops in every few months, thats about it.

Besides, if he wanted to work on any of his tutorials, adding extras to this is the least of his worries...
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#32
Yeah but he's been here alot lately.

o.O
Reply
#33
Rezeyu Wrote:Yeah but he's been here alot lately.

o.O

Meh, still, it can't really be say he frequents the board. He just pops in from time to time.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#34
Robin Wrote:
Rezeyu Wrote:Yeah but he's been here alot lately.

o.O

Meh, still, it can't really be say he frequents the board. He just pops in from time to time.

Agreed.
Reply
#35
At first it didn't work for me in Mirage Source 3.0.3
I have Scrolling Maps implented so I'm almost pretty sure that's why it didn't work out for me.

I just fixed it by changing the X and Y where the text should be drawn.

If you use MS 3.0.3. and have scrolling maps implented.
Then below the following code:

Code:
' Lock the backbuffer so we can draw text and names
        TexthDC = DD_BackBuffer.GetDC

Add:
Code:
If NPCWho > 0 Then
              If MapNpc(NPCWho).Num > 0 Then
        If GetTickCount < NPCDmgTime + 2000 Then
              Call DrawText(TexthDC, (Int(Len(NPCDmgDamage)) / 2) * 3 + GetPlayerX(MyIndex) * PIC_X + Player(MyIndex).XOffset + (PIC_X * (MAX_MAPX + 1)) + sx, GetPlayerY(MyIndex) * PIC_Y + Player(MyIndex).YOffset - 4 + (PIC_Y * (MAX_MAPY + 1)) - 22 - ii + sx, NPCDmgDamage, QBColor(BrightRed))
        End If
              ii = ii + 1
              End If
        End If
              
        If NPCWho > 0 Then
            If MapNpc(NPCWho).Num > 0 Then
                If GetTickCount < DmgTime + 2000 Then
                    Call DrawText(TexthDC, (Int(Len(DmgDamage)) / 2) * 3 + MapNpc(NPCWho).x * PIC_X + MapNpc(NPCWho).XOffset + (PIC_X * (MAX_MAPX + 1)) + sx, MapNpc(NPCWho).y * PIC_Y + MapNpc(NPCWho).YOffset - 4 + (PIC_Y * (MAX_MAPY + 1)) - 22 - iii + sx, DmgDamage, QBColor(White))
                End If
            iii = iii + 1
            End If
        End If
Reply
#36
I'm working on getting this working now.

I can display the damage that the player recieves from the NPC, but for some reason I can only get it to display above the players head using this syntax:
Code:
Call DrawText(TexthDC, (PIC_X * (MAX_MAPX + 1)) + (NewX + sx + Int(PIC_X / 2) - ((Len(NPCDmgDamage) / 2) * GameFontSize)), (PIC_Y * (MAX_MAPY + 1)) + (NewY + sx - Int(PIC_Y / 1)), "-" & NPCDmgDamage, RGB(255, 0, 0))

I can't seem to find the location of the NPC and display the damage above it that the player does.

Also, the problem with that code is that it doesn't display the NPC damage until you attack that NPC.
So, this is what I did...

All I did was remove these if statements:
Code:
If NPCWho > 0 Then
              If MapNpc(NPCWho).Num > 0 Then

And just have this:
Code:
If GetTickCount < NPCDmgTime + 2000 Then
                            Call DrawText(TexthDC, (PIC_X * (MAX_MAPX + 1)) + (NewX + sx + Int(PIC_X / 2) - ((Len(NPCDmgDamage) / 2) * GameFontSize)), (PIC_Y * (MAX_MAPY + 1)) + (NewY + sx - Int(PIC_Y / 1)) - ii, "-" & NPCDmgDamage, RGB(255, 0, 0))
                        End If
                        ii = ii + 1
Reply
#37
Ok, after fixing this up I just decided to display both damage taken and damage given above the player.
Check the attachment to see the example. Damage scrolls upwards, which is why it's not all level in the screenshot.
I've also added this to player attacking.

Red text = Damage taken
Green text = Damage given out
Reply
#38
If you are uber leet you end up with this xP

[Image: spellconcept.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)