dagobaking Posted December 28, 2017 Share Posted December 28, 2017 Hello. I am trying to apply a simple "Wait" package to Actors to make then stop what they are doing and hold still until the package is removed. I added the package to a RefCollectionAlias within a Quest. I am able to add an Array of Actors to the RefCollectionAlias. I verified this by tracing the size of the collection and that looks like it is working. However, it doesn't look like the package is being applied. The Actors just continue sandboxing or walking around. I have two guesses as to the cause:1) The package is not being applied to the actors in the collection at all because there is some other step I need to take to activate it? or 2) The package is added. But, other packages already running on the actors are taking priority. --- Does anyone know how to accomplish what I'm trying to do? What is the easiest way to apply a new package to an Actor or group of Actors? Does anything need to be done to make sure that your package runs over any others? Do I need to have a condition in the package to make it work? I currently have no conditions set. Link to comment Share on other sites More sharing options...
FlashyJoer Posted December 28, 2017 Share Posted December 28, 2017 (edited) Making the package have an owner quest and then assigning that package to the ref alias is how I do it. So if your quest with the ref alias is called 'CollectionQuest', make this the owner quest in the package window. Then, in the actual ref alais, in the alias packages box, right click, select ADD and find your package. As soon as the ref alias is filled, whoever fills it has the package applied. You could also add an oninit() script to the ref alias, so that the moment it is filled, this script is ran on the actor(s). Something like: Event OnInit()Self.EvaluatePackage()EndEvent Which literally just forces the actor to re-evaluate their package stack the moment they are filled into the ref... Edited December 28, 2017 by joerqc Link to comment Share on other sites More sharing options...
dagobaking Posted December 28, 2017 Author Share Posted December 28, 2017 Thank you. I set the package to have the relevant owner quest. But, that didn't change anything. I am running EvaluateAll on the RefCollectionAlias after populating it. That is supposed to run EvaluatePackage on all Actors in the collection. One thing that it sounds like I am doing differently than you is using the RefCollectionAlias instead of individual aliases. This is because I want to apply the package to a group of actors of variable size. But, maybe setting a package to a RefCollectionAlias doesn't work because it tries to apply to basically an array? Have you tried setting up packages on RefCollectionAlias'? Link to comment Share on other sites More sharing options...
FlashyJoer Posted December 28, 2017 Share Posted December 28, 2017 Never... when I need to apply refs to a series of available NPCs I usually create up to 10 separate refs on the quest with conditioning to not select NPCs with a particular faction applied to them. Because I apply the faction to them as an alias faction. In this way, I can find say, the 10 closest NPCs to the player and make them all do the same thing and have the same package/faction. I may be doing it very inelegantly though, but it does work... Link to comment Share on other sites More sharing options...
dagobaking Posted December 28, 2017 Author Share Posted December 28, 2017 Would you mind posting a snippet of code showing how you get those Actors set up? I just tried switching to individual reference aliases and am getting the same issue. The actors are successfully added to the alias. But, "GetCurrentPackage" does not equal the package I'm trying to run. So, I must be missing some step... Do you have to populate the referencealiases with the actors base object or something? Link to comment Share on other sites More sharing options...
Recommended Posts