06-11-2008, 09:32 AM
Hello,
These are few questions more targeted to Robin... Its based on the source I got from him [v0.0.9].
But anyone else willing can take a shot at answering them
I have a problem right now with targeting NPC's. If I click on myself or another player it tells me that they are my target. But if I click on an NPC [monster/npc], it dosent show them as targeted. I was wondering how I could do that.
Also I would like when they are targeted to blt a 32x32 sprite box around them, and also if their a NPC/Friendly to have a seprete sprite [a blue square], and if their a monster [bat/etc.] to blt a seprate [a red square] sprite.
Ex:
![[Image: guy_target.jpg]](http://i223.photobucket.com/albums/dd47/stockton950/guy_target.jpg)
Thanks
*Edit: Heres the code (i think) for the targeting:
These are few questions more targeted to Robin... Its based on the source I got from him [v0.0.9].
But anyone else willing can take a shot at answering them

I have a problem right now with targeting NPC's. If I click on myself or another player it tells me that they are my target. But if I click on an NPC [monster/npc], it dosent show them as targeted. I was wondering how I could do that.
Also I would like when they are targeted to blt a 32x32 sprite box around them, and also if their a NPC/Friendly to have a seprete sprite [a blue square], and if their a monster [bat/etc.] to blt a seprate [a red square] sprite.
Ex:
![[Image: bee_target.jpg]](http://i223.photobucket.com/albums/dd47/stockton950/bee_target.jpg)
![[Image: guy_target.jpg]](http://i223.photobucket.com/albums/dd47/stockton950/guy_target.jpg)
Thanks

*Edit: Heres the code (i think) for the targeting:
Code:
Public Sub BltTarget()
If TargetType = TARGET_TYPE_PLAYER Then
rec.top = 240
rec.Left = 0
rec.Bottom = rec.top + 80 + 8
rec.Right = rec.Left + 48
'rec.top = 0
'rec.Bottom = 20
'rec.Left = 0
'rec.Right = 20
DD_MiddleBuffer.BltFast (Player(Target).X * 32) + Player(Target).XOffset - 8, (Player(Target).Y * 32) + Player(Target).YOffset - 44, DD_MiscSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY
'DD_MiddleBuffer.BltFast 20, 20, DD_MiscSurf, rec, DDBLTFAST_SRCCOLORKEY And DDBLTFAST_WAIT
Else
rec.top = 240
rec.Left = 0
rec.Bottom = rec.top + 80 + 8
rec.Right = rec.Left + 48
DD_MiddleBuffer.BltFast (MapNpc(Target).X * 32) + MapNpc(Target).XOffset - 8, (MapNpc(Target).Y * 32) + MapNpc(Target).YOffset - 44, DD_MiscSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY
End If
End Sub