| Mirage Source http://miragesource.net/forums/ |
|
| Adding NPC Chat http://miragesource.net/forums/viewtopic.php?f=201&t=858 |
Page 1 of 1 |
| Author: | halla [ Sun Dec 17, 2006 1:33 am ] |
| Post subject: | Adding NPC Chat |
Ok I pretty much have it but I just have some trouble... right now I have it open a form and say the attacksay and the npcs name. How its set now it only does it when you attack an agressive NPC. I tried on a friendly one but it says I cant hurt it and wont bring it up. I tried to set it if FRIENDLY then to do it but some reason its not working. On the Server in modGameLogic I have this in the AttackNPC sub Code: ' Check if we should send a message
If MapNpc(MapNum, MapNpcNum).Target = 0 And MapNpc(MapNum, MapNpcNum).Target <> Attacker Then If Trim(Npc(NpcNum).AttackSay) <> "" Then Call NPCTalk(Attacker, Trim(Npc(NpcNum).Name), Trim(Npc(NpcNum).AttackSay), SayColor) End If End If Thats when it used to call AttackSay but I made it open the chatbox and so on. Anyways where should I place the code or whatever to get it to do it when I try to attack a Friendly Target... that way it wont bring up a chat when you attack a monster and only when its friendly. Thanks |
|
| Author: | Matt [ Sun Dec 17, 2006 2:18 am ] |
| Post subject: | |
Someone posted a tut for that. So that it works with shop keeper, friendly, etc. |
|
| Author: | Dragoons Master [ Sun Dec 17, 2006 2:20 am ] |
| Post subject: | |
It says you can't attack that npc becouse you realy can't. That verification is made inside function CanAttackNpc. Just search for .Behavior and you will find something. |
|
| Author: | halla [ Sun Dec 17, 2006 2:41 am ] |
| Post subject: | |
Ok thanks... so I guess I have it placed in the wrong spot. I will check into that. Oh I dont remember ever seeing a tutorial for this. Plus still feels better to do it on my own even if its not as good lol If there isnt a tutorial though when im done I could write one up if anyone wanted EDIT:: OK I got it now. Thanks for pointing me in the right direction. I will neaten it up... add the npcs picture and stuff and possibly add options and so on. |
|
| Author: | Matt [ Sun Dec 17, 2006 4:15 am ] |
| Post subject: | |
http://ms.shannaracorp.com/forums/viewtopic.php?t=859 |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|