09-12-2008, 08:07 PM
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:
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:
And just have this:
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