Blitzkrieg Posted May 11, 2021 Posted May 11, 2021 Hi, I'd like to share my test results regarding see_creature handler and Lookneighbor () function and get some more input or get a discussion going regarding the way they work. Test performed: Change AI and type of NPC and check how it detects PC and another NPC (citizen). Platform: GF PTS (Emca's Extender). Results 1) For Boss type NPC Without LookNeighbor: Boss detects PC (see_creature initialization) for radius = agro_range (npcdata parameter) and keeps detecting it even with the slightest PC movement. It will not detect PC if PC stops moving. NPC is not detected at all. With LookNeighbor: Boss detects PC (see_creature initialization) for radius = agro_range (npcdata parameter) and keeps detecting it even with the slightest PC movement. It also spots immobile PC / NPC. This happens every 30 seconds and if you want it to work again you need to have LookNeighbor run continuously in a timer loop. Basically see_creature checks if lookneighbor has been executed and sets it to zero after execution. 2) For Warrior / citizen type NPC Without LookNeighbor: Warrior / citizen detects PC (see_creature handler) inside radius of ~ 400 (standard). In order to detect it again, PC must leave radius (move further away) and enter again. With LookNeighbor: See_creature handler is initialized (for ~ 400 standard radius) and it spots both PC / NPC. This happens every 30 seconds and if you want it to work again you need to have LookNeighbor run continuously in a timer loop. Overall, I found no use of Lookneighbor argument (I initially thought it would be the radius that NPC is looking for other npcs). Whether I used 20 or 2000 values, I had the same results. This is further confirmed by the behavior of guards at gludio airship attacking zealot of silen. I spawned a zealot of silen outside of the broadcast range script (ai_fanatic_of_silen) to avoid alerting the guards. When the guard (ai_guard_of_airharbor1) got close, he ignored the zealot even though there is this code: EventHandler NODE_ARRIVED (script_event_arg1, script_event_arg2) { LookNeighbor (1000); } I believe this happened because of guard's bad timing ( 30 seconds expired and see_creature got initialized when he got out of 400 radius range, therefore he didn't attack zealot). I ran this test more times and there were a few cases that he did attack, so it's indeed a timing thing. Video link regarding this behavior: https://www.youtube.com/watch?v=ju3obIkaMTc 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now