Mirage Source http://web.miragesource.net/forums/ |
|
Guard Behavior http://web.miragesource.net/forums/viewtopic.php?f=201&t=3211 |
Page 1 of 1 |
Author: | Bradyok [ Wed Dec 26, 2007 4:14 am ] |
Post subject: | Guard Behavior |
Was looking through the code today, and I noticed the guard code, In modGameLogic, Sub AttackNpc: Code: ' Now check for guard ai and if so have all onmap guards come after'm If Npc(MapNpc(MapNum, MapNpcNum).Num).Behavior = NPC_BEHAVIOR_GUARD Then For i = 1 To MAX_MAP_NPCS If MapNpc(MapNum, i).Num = MapNpc(MapNum, MapNpcNum).Num Then MapNpc(MapNum, i).Target = Attacker End If Next i End If This doesn't send ALL guard npcs after the player, it only sends guards of the same number. Is this just a misleading caption or a bug? The fix would be as follows: Change Code: If MapNpc(MapNum, i).Num = MapNpc(MapNum, MapNpcNum).Num Then To Code: If Npc(MapNpc(MapNum, i).Num).Behavior = NPC_BEHAVIOR_GUARD Then Again, optional. Personally I won't put this in, but the caption does say ALL. -Bradyok |
Author: | Rezeyu [ Wed Dec 26, 2007 4:27 am ] |
Post subject: | Re: Guard Behavior |
It's for if you have different factions. Lets say you have Guards, and Thieves set as guards. Attack one, and they all come, but the other doesn't. Wouldn't make sense if you attacked a guard, and the thieves attacked you. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |