Author Topic: Man NPC's are retarded!  (Read 314 times)

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Man NPC's are retarded!
« on: January 17, 2011, 05:22:39 am »


               Ive been trying to path my NPC's around locked doors for an hour now... I dont want them to go through the locked door when 2 inches away theres a perfectly open door to go through... Its an area transition and when I have the NPC actually use the door I want then go to the next waypoint on the next area it goes back to the first area then back to the damn door it was trying to go through in the first place (locked one)... OR the same door on the second level that leads to the other on the first (locked one again)... LOL its like watching the special olympics... Would it help if I increased their intellegence to say 25 or something? Or are NPC gods stupid too? ':lol:'

Anyways I really would love to know what drives the AI to choose and if there is a workaround for this scripted somewhere... Much appreciated!

Oh and hello im new lol!

Edit: I should also mention that I have stripped the bash code out of the NPC... Set the door to commoner... & dont want to set too many waypoints... I know that does fix the problem putting them closer but what I want is a way to avoid locked doors altogether & see them as obsticles instead of paths... Waypoints cause the NPC to stop and pause for a second like there lost or something... An uninterrupted walk from point A to point B is so much more realistic...
               
               

               


                     Modifié par keyofrassilon, 17 janvier 2011 - 05:41 .
                     
                  


            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Man NPC's are retarded!
« Reply #1 on: January 17, 2011, 06:16:42 am »


               Well even adding multiple waypoints DOES NOT fix the problem... It seems area transitions for NPCs is buggy to say the least... I even have them use the door and they choose the other one grrrr... I think I will have to create an alternate route way far away from that damn door!

This is what I did... At first I added maybe 3 waypoints... one at start... using the door is another... one at the front of the door on the second level... That worked! But then I started adding more leading the NPC to its destination it started going back to that door thats locked over and over... Hell I even increased the friggin perception range on the NPC to no avail!... It does not have this problem within the area but going to another area it wigs the hell out like its on crack or something '<img'>
               
               

               


                     Modifié par keyofrassilon, 17 janvier 2011 - 06:19 .
                     
                  


            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Man NPC's are retarded!
« Reply #2 on: January 17, 2011, 06:59:45 am »


               What you can do is have pc check what area it is in and only goto waypoints in that area.  Reason it does that is if rem correctly a area trans fires spawn in condition. but I may be wrong
               
               

               
            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Man NPC's are retarded!
« Reply #3 on: January 17, 2011, 04:06:30 pm »


               I fixed it! I was indeed right on the money saying they were retarded! Setting the AI from Low to Normal did the trick... I placed this line in the OnSpawn script:



SetAILevel(OBJECT_SELF, AI_LEVEL_NORMAL);



Also I read somewhere that in the Module's OnLoadModule event uncommenting this line helps as well...



SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE);



Now they transition properly... And with less headache!... Thanks for the seed of info that lead me to the right track... When you mentioned spawning when a transition happens made me think it must reset everything somehow...