Making an enemy see farther?

Post » Wed Jun 20, 2012 6:10 pm

I've got a bossfight between the player and a huge dwemer centurion, in this sort of large arena area. The player will be chased around by it while finding ways to hurt it, etc.
That all works fine, except there's a slight problem with it. Between the size of both the centurion and the area, eventually the player gets far enough away that the centurion is no longer able to see them or ignores them or something, and walks away, despite it being a flat landscape. I want the centurion to always chase and attack the player, regardless of distance.
How would I do this? I tried increasing the Aggro Radius to an absurdly high number, but that didn't make a difference.
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Wed Jun 20, 2012 6:22 pm

Try attaching a script to the Centurion:

Scriptname CenturionScript Extends ObjectReferenceObjectReference Property aCenturion AutoObjectReference Property aPlayer AutoLocation Property CenturionsCell AutoEvent OnInit()	 RegisterForSingleUpdate(5)EndEventEvent OnUpdate()	 If aCenturion.IsInCombat == False && aCenturion.Is3DLoaded() == True		  aCenturion.PathToReference(aPlayer)	 EndIfRegisterForSingleUpdate(5)EndEvent
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Thu Jun 21, 2012 1:09 am

CenturionScript.psc(12,23): IsInCombat is not a property on script objectreference or one of its parentsCenturionScript.psc(12,34): cannot compare a none to a bool (cast missing or types unrelated)CenturionScript.psc(13,29): PathToReference is not a function or does not exist
User avatar
Angus Poole
 
Posts: 3594
Joined: Fri Aug 03, 2007 9:04 pm

Post » Wed Jun 20, 2012 6:32 pm

Managed to fix the script, but it doesn't work. The centurion still behaves like it previously did.
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm

Post » Wed Jun 20, 2012 7:24 pm

How would I check to see if PathToReference completed successfully?
User avatar
x_JeNnY_x
 
Posts: 3493
Joined: Wed Jul 05, 2006 3:52 pm

Post » Thu Jun 21, 2012 1:28 am

Managed to sort of fix everything using that "FollowPlayer" AI package. Sort of.
Two problems persist. Upon entering the cell it takes a little while for him to actually start to chase after the player. And once the player enters combat, then runs away from him, instead of following the player, he'll just give up.
Any way to fix these two?
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am


Return to V - Skyrim