Mirage Source http://miragesource.net/forums/ |
|
Overhead Damage http://miragesource.net/forums/viewtopic.php?f=210&t=58 |
Page 2 of 3 |
Author: | Krloz [ Wed Sep 06, 2006 9:53 pm ] |
Post subject: | |
Fix what.. It does work perfectly lol |
Author: | Obsidian [ Wed Sep 06, 2006 10:02 pm ] |
Post subject: | |
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. |
Author: | Sh4d0ws [ Wed Aug 29, 2007 1:11 am ] |
Post subject: | Re: Overhead Damage |
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. |
Author: | Robin [ Wed Aug 29, 2007 1:48 am ] |
Post subject: | Re: Overhead Damage |
This is over a year old and the OP doesn't frequent the forums anymore... |
Author: | Rezeyu [ Wed Aug 29, 2007 1:58 am ] |
Post subject: | Re: Overhead Damage |
Ilovelamp wrote it. |
Author: | Robin [ Wed Aug 29, 2007 2:09 am ] |
Post subject: | Re: Overhead Damage |
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... |
Author: | Rezeyu [ Wed Aug 29, 2007 2:17 am ] |
Post subject: | Re: Overhead Damage |
Yeah but he's been here alot lately. o.O |
Author: | Robin [ Wed Aug 29, 2007 1:43 pm ] |
Post subject: | Re: Overhead Damage |
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. |
Author: | Matt [ Thu Aug 30, 2007 12:13 pm ] |
Post subject: | Re: Overhead Damage |
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. |
Author: | Johny050 [ Thu Nov 27, 2008 9:55 pm ] |
Post subject: | Re: Overhead Damage |
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 |
Author: | Xlithan [ Tue Dec 09, 2008 8:07 pm ] |
Post subject: | Re: Overhead Damage |
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 |
Author: | Xlithan [ Tue Dec 09, 2008 9:14 pm ] | ||
Post subject: | Re: Overhead Damage | ||
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
|
Author: | Coke [ Mon Jan 19, 2009 1:37 am ] |
Post subject: | Re: Overhead Damage |
If you are uber leet you end up with this xP |
Page 2 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |