Welcome to MaxCheaters.com

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

Recommended Posts

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

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.