![]() |
|
Guard Behavior - 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: Guard Behavior (/showthread.php?tid=1480) |
Guard Behavior - Bradyok - 26-12-2007 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'mThis 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 ThenTo Code: If Npc(MapNpc(MapNum, i).Num).Behavior = NPC_BEHAVIOR_GUARD ThenAgain, optional. Personally I won't put this in, but the caption does say ALL. -Bradyok Re: Guard Behavior - Rezeyu - 26-12-2007 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. |