Domenicus7 Posted December 23, 2020 Share Posted December 23, 2020 I am trying to make a mod, but I have two problems: NPCs I use ignore all AI packages I give them in a quest. I'm pretty sure that the conditions for the packages are becoming true but they just don't do what I want them to. I am calling Alias.GetActorReference().Evaluatepackage() on them. I can't figure out how to force an actor to equip an item. I've tried doing actor.additem and actor.equip but nothing happens. I'm doing it like so:Function tryArrest(Actor actorToCheck) debug.notification(self +" trying to arrest "+actorToCheck) debug.notification(actorToCheck.IsDead()) if(!actorToCheck.IsDead()) debug.notification(actorToCheck+ " is alive, cuffing them") actorToCheck.AddItem(PrisonerCuffs) actorToCheck.equipItem(PrisonerCuffs, True) endif kMyQuest.tryarrest(Alias_Betrid.GetActorReference()) Can anyone help with either problem? Link to comment Share on other sites More sharing options...
Evangela Posted December 26, 2020 Share Posted December 26, 2020 Try adding a small wait between additem and equipitem. I don't remember why, but sometimes it's necessary to do that when certain functions are called behind each other. Utility.wait(0.1) Link to comment Share on other sites More sharing options...
Recommended Posts