Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Npc Targeting
#1
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 Smile

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] [Image: guy_target.jpg]

Thanks Smile

*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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)