Jump to content

[AI] About seeking the player and EvaluatePackage()


Recommended Posts

I remember SKK50 once mentioning how hard it was to get his combat stalkers to work, because once they set out to search the player and the player moved, they went to the location the player was in first.

 

 

So does a loop with GameTimer() and EvaluatePackage() work? In my case it doesn't have to be super perfect.

Link to comment
Share on other sites

That is if using a Travel AI package template which really wants a fixed location as destination. To make them work correctly I use a seperate package evaluation script on a 5 second timer loop. Nasty, but necessary to keep chnanging movement speed based on distance which is the key combat element.

 

The elegant solution is to simply use a Follow package template which allows for moving targets.

Link to comment
Share on other sites

Could you give the package a parallel DoNothing branch with a timer, and set the package to finish whenever any branch completes. That way, assuming the follow package is the only valid one on the stack, the actor will follow to the old position for however long the wait is for, then the package will time out, re-evaluate, and recommence.

 

Might save messing around with timer loops and scripts.

Link to comment
Share on other sites

No, it never has been an issue.

 

Packages are controlled by a number of attributes, like distance from player for speed and if the player is sleeping/waiting/crafting/inscene to hold position.

 

Note package condition IsPCSleeping is not reliable so I use a script that Self.RegisterForPlayerSleep() Self.RegisterForPlayerWait() to set a global that holds packages.

 

That level of script logic granularity for awesome UX is not available to raw AI packages.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...