SMB92 Posted July 8, 2017 Share Posted July 8, 2017 Hi folks, I am curious to know the answer to the topic. I am spawning actors at hand placed points (xmarkers) and while the function itself completes very quickly, actors don't start their packages until a few seconds later. They don't fire in parallel either as each actor starts moving one by one. In general we have noticed AI packages to be slow to start in all cases in the game. Any ideas how to improve this or what the deal is? Is the package script/engine really this latent? Link to comment Share on other sites More sharing options...
llamaRCA Posted July 8, 2017 Share Posted July 8, 2017 Actors evaluate their packages every few seconds so they they won't make a change (assuming all conditions, etc support that change) until the next time they do their scheduled package evaluation which happens every few seconds. The two ways I know of to force that evaulation are: 1) script that change with evaluatepackage() 2) use scenes to get them to do stuff because as they go in/out of scenes they will automatically change packages as the scene starts/ends and do it pretty much immediately on start/end Link to comment Share on other sites More sharing options...
SMB92 Posted July 9, 2017 Author Share Posted July 9, 2017 Thx for the reply. So what about using the start fragment on the package? Or seems it is applied by refalias, adding the script there? Or I suppose I could issue the command straight after I've applied the package... I'm looking at ways I can place a small script on each actor the will keep them persistent for a small amount of time while they are in the loaded area, dead ir alive, so that when the spawnpoint issues its deletewhenable command the NPC won't magically disappear until the cell is unloaded. Link to comment Share on other sites More sharing options...
FiftyTifty Posted July 9, 2017 Share Posted July 9, 2017 (edited) After spawning the actor, call EvaluatePackage() on it. E.g: Function DoSpawn(ObjectReference akObjRef) Actor actorSpawned = PlayerRef.PlaceAtMe(akObjRef)as Actor actorSpawned.EvaluatePackage() EndFunction Edited July 9, 2017 by FiftyTifty Link to comment Share on other sites More sharing options...
SMB92 Posted July 10, 2017 Author Share Posted July 10, 2017 Yeah I started doing that, forgot you could call it from the object script still Link to comment Share on other sites More sharing options...
Recommended Posts