| Mirage Source http://www.miragesource.net/forums/ |
|
| NPCs Talk When Attacked http://www.miragesource.net/forums/viewtopic.php?f=210&t=859 |
Page 1 of 1 |
| Author: | Tutorial Bot [ Sun Dec 17, 2006 3:34 am ] |
| Post subject: | NPCs Talk When Attacked |
Author: Izzy545 Difficulty: 1/5 :: SERVER SIDE :: In sub CanAttackNpc, under "' Make sure they are on the same map", in the select case statement, for all directions replace: Code: If Npc(NpcNum).Behavior <> NPC_BEHAVIOR_FRIENDLY And Npc(NpcNum).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then CanAttackNpc = True Else Call PlayerMsg(Attacker, "You cannot attack a " & Trim(Npc(NpcNum).Name) & "!", BrightBlue) End If With: Code: If Npc(NpcNum).Behavior <> NPC_BEHAVIOR_FRIENDLY And Npc(NpcNum).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then CanAttackNpc = True Else Call PlayerMsg(Attacker, Trim(Npc(NpcNum).Name) & " says: '" & Trim(Npc(NpcNum).AttackSay) & "'", BrightBlue) End If Remember to replace the code for all directions, i.e: Case DIR_UP, Case DIR_DOWN, etc. |
|
| Author: | ShadowMaster [ Mon Nov 05, 2007 5:41 pm ] |
| Post subject: | Re: NPCs Talk When Attacked |
Should it also be in CanAttackNPcWithArrows sub? |
|
| Author: | William [ Mon Nov 05, 2007 5:53 pm ] |
| Post subject: | Re: NPCs Talk When Attacked |
ShadowMaster wrote: Should it also be in CanAttackNPcWithArrows sub? Yeah it should, although I don't see how anybody would want to talk if they get a arrow in them |
|
| Author: | Lea [ Mon Nov 05, 2007 5:54 pm ] |
| Post subject: | Re: NPCs Talk When Attacked |
THat's for you to judge, as it's your addition to the MS source, and all tutorials base off of MSE Build 1 with no additions unless otherwise expressly stated. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|