![]() |
Npc Targeting - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Npc Targeting (/showthread.php?tid=2347) |
Npc Targeting - Avarit - 06-11-2008 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: ![]() ![]() Thanks ![]() *Edit: Heres the code (i think) for the targeting: Code: Public Sub BltTarget() Re: Npc Targeting - William - 06-11-2008 Try and post the code for it, maybe something is wrong with whats currently there. Re: Npc Targeting - Matt - 06-11-2008 For the squares, I suggest you just use directdraw. Don't waste time with the sprite. Re: Npc Targeting - Avarit - 06-11-2008 Allright ill try that, does anyone know whats up with the npc targeting though? Re: Npc Targeting - GIAKEN - 06-11-2008 Here's my BltTargetting sub. Code: Public Sub BltTargetting() Re: Npc Targeting - Avarit - 07-11-2008 I tried it but it gave me some errors, i guess ill have to modify it ![]() Thank you though. Edit* Nope i modified it and it still wont target npc's :/ Double Edit* Im trying to get it when you target an NPC it tells you in the txtChat that it is your target. Right now it only works for players like "n% is now your target." Re: Npc Targeting - genusis - 07-11-2008 find where it targets the player when you click on them. copy that paste it where it should be and change to NPC. IT really help me if i saw the code though. like for example, 4.6 code sorry ^^ but basically find something close to this in the player Code: ' Change target //npc// for 4.6 Code: ' Check for an npc TempPlayer(Index).Target = i changes the target selected TempPlayer(Index).TargetType = TARGET_TYPE_NPC changes the target type to npc so it doesn't show up as a player haha ^^ Call PlayerMsg(Index, "Your target is now " & Trim$(Npc(MapNpc(GetPlayerMap(Index), i).Num).Name) & ".", Yellow) calls the message that says "Your target is now npc1. Re: Npc Targeting - genusis - 07-11-2008 well the code i used is from MSE 4.6< which i said on there> but basically search for TargetType and you should find it. should be server side for one. in mod handle data in 4.6 so you can try that ^^. just things to help you find it. he must have just deleted his recent post V.V sigh~ Re: Npc Targeting - Avarit - 07-11-2008 Sweet! Got it working ![]() heres what I came up with: Code: ' Check for an npc Works great now ![]() Re: Npc Targeting - genusis - 07-11-2008 you are welcomed ^^. Re: Npc Targeting - William - 07-11-2008 What button are you using to cast spells? Re: Npc Targeting - Avarit - 07-11-2008 I dont know ![]() this is my first week working with vb6 and ms XD Re: Npc Targeting - GIAKEN - 07-11-2008 Yeah my code for targetting is a bit more complicated than just the blting part, sorry. |