![]() |
Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? (/Thread-Why-do-NPCs-attacking-eachother-Seemingly-randomly-run-away-from-each-other) |
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - WRWR - 08-02-2012 04:23 PM IF (<SRC.isEVENT.e_AI_Hostile>) RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Rayvolution - 08-02-2012 11:00 PM (08-02-2012 04:23 PM)WRWR Wrote: IF (<SRC.isEVENT.e_AI_Hostile>) That did the trick! Although, I had to change it to isTEVENT ![]() Thanks! RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Extreme - 08-03-2012 02:00 AM (08-02-2012 04:05 PM)Gil Amarth Wrote: You can try ISTEVENT. (08-02-2012 04:23 PM)WRWR Wrote: IF (<SRC.isEVENT.e_AI_Hostile>)I agree with both of you, but, using this function, I think will do 2 operations. <SRC.ISEVENT.E_AI_HOSTILE> one operation and the ISEVENT Function, second operation, that maybe already be a STRMATCH So, if someone know, whats quickly, do the operation in the condition or call a function to do the operation? I choose the first one because looks quickly, but I don't know. RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Anarch Cassius - 08-03-2012 09:50 AM Quote: These sounds like issues. The first should only be a problem if you don't have guardzones. Guard brain is meant to work with guard zones and it rescriptable if you aren't using them so this is fine. The second is an issue. I'd be in favor of any non-defined brains having no behavior. The only downside would be logically this should include not movement behavior. Then you have a totally blank slate to work from, you just need to give it wander orders on your own. The third is interesting because it doesn't work on Elves. Test the other ML creatures. I suspect it's code written before they existed. I'd like to see this specifically disable-able since it's no longer complete and likely to be undesired on many servers. RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Rayvolution - 08-03-2012 10:43 AM (08-03-2012 09:50 AM)Anarch Cassius Wrote:Quote: The first sounds like that's the issue, since I'm still in heavy dev on my maps I haven't even bothered writing the region/map flags for anything, and my main city is by-the-scripts in the middle of no where. But, even when I do write the map flags, my cities won't have the "Guarded" flag anyway. My new guards don't use brain_guard anyway and my cities won't technically (As far as Sphere is concerned) be "guarded" areas since the guards will just be regular NPCs wandering the streets. ![]() Second won't be an issue, since I overcame that with my new AI system I'm writing. I'll just be keeping their brains as-is. ![]() Third actually does the same with elves, and all other bodies I've tried. The only reason elves "fix" my problem is because I don't use elves anywhere on my server, so if the only elves are the guards, the guards should operate correctly 100% in all situations now. Unless they attack each other, but there's no AI flags (or plan to have any) to ever make them do that. RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Extreme - 08-03-2012 12:15 PM A sux but funny 'invasion'. To works, create I_SPAWN_INVADER and I_SPAWN_DEFENDER and it will summon the mobs and will have an infinity combat hahaha RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - WRWR - 08-03-2012 06:08 PM Funny orcs but Code: 14:05:DEBUG:__ thread (9460) __ | # | _____ function _____________ | ticks passed from previous function start ______ RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Extreme - 08-04-2012 02:20 AM (08-03-2012 06:08 PM)WRWR Wrote: Funny orcs butStrange... I runned it for one day and don't get any errors... Maybe is your settings in sphere.ini... What about network settings? RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - darksun84 - 08-04-2012 02:42 AM it's a very interesting script ![]() The only problem is that sometime the orcs spawns on the wrong place(like above a wall), still it's very funny ![]() RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Extreme - 08-04-2012 02:45 AM (08-04-2012 02:42 AM)darksun84 Wrote: it's a very interesting scriptAh.. thats because I set to spawn around the spawner.. of course we can fix it, its easy =D |