![]() |
NPCs not fighting back? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: NPCs not fighting back? (/Thread-NPCs-not-fighting-back) Pages: 1 2 |
NPCs not fighting back? - Arathil - 10-01-2016 04:19 PM I have some NPC guards in a city with a very simple script that fires when they see a flagged criminal player. Essentially: ON=@NPCSeeNewPlayer IF (<SRC.FLAGS>&STATF_CRIMINAL) ATTACK <SRC.UID> SAY=Meet your fate, criminal! ... ... ... It seems to fire correctly, You see a *Guard is attacking Criminal* emote, and the guard gets into war mode, but the NPC doesn't actually start attacking and wanders away. If the Criminal makes an effort to attack the guard and hits them, then it will fight back as it should. I cannot figure out for the life of me why this is happening. Any ideas? RE: NPCs not fighting back? - Kanibal - 10-01-2016 09:16 PM .GM and .INVUL must be off ![]() RE: NPCs not fighting back? - x77x - 10-02-2016 01:46 PM it does in to regular accounts too... its like the memory deletes after a few seconds RE: NPCs not fighting back? - Coruja - 10-06-2016 08:34 AM I found an problem where guards NPCs already placed on world are not attacking criminal/murderer chars nearby but I already fixed it on latest build, try using it: https://ci.appveyor.com/project/coruja747/source/build/0.56.4.222/artifacts RE: NPCs not fighting back? - x77x - 10-06-2016 09:16 PM but if hes using the above, i doesnt have a guard brain =P mine looks like this Code: [events e_army_soldier] RE: NPCs not fighting back? - Leonidas - 11-05-2016 05:09 AM Did you ever figure this out because I'm having a similar issue. Code: ON=@NPCSeeNewPlayer They go into war mode, they say "Criminals arent allowed" then they start walking around. RE: NPCs not fighting back? - Coruja - 11-05-2016 01:15 PM I think it makes more sense use 'brain_guard' (which already attack criminal/murderers nearby) instead use another custom brain with @NPCSeeNewPlayer -> ATTACK just set brain_guard on NPC and use @NPCSeeNewPlayer -> return 1 if you want skip the internal check (eg: don't attack if outside region X, don't attack targets that doesn't have TAG.LOL, etc) RE: NPCs not fighting back? - Anarch Cassius - 01-26-2017 04:48 PM The problem is that neither ATTACKER.ADD or ATTACK reliably cause an NPC to attack another NPC anymore. This has made pretty much all NPC fight scripts useless. All my faction AI is broken. RE: NPCs not fighting back? - massis87 - 01-26-2017 08:19 PM same as cassius, you have to change brain and karma of the npc like u want. Code: [CHARDEF C_Guardia_Umana] this is my custom guard RE: NPCs not fighting back? - Anarch Cassius - 01-27-2017 05:07 AM Quote:same as cassius, you have to change brain and karma of the npc like u want. No. I explained in the other thread. NPCs should attack when ordered by script regardless. ATTACK does not work, this is a bug. Changing karma is a crude workaround people should have stopped using years ago. We want this user controlable, not relying on the hard code to allow a few predetermined behavoir types. |