opusGlass Posted May 12, 2017 Share Posted May 12, 2017 I haven't worked with AI at all. Is it possible to make a spell that gives the target a certain destination, and causes them to walk to that destination, then stay at that destination indefinitely? I'm guessing I will need to make an AI package, and a quest that gives that package to an alias, and then the spell will tell the quest to use the target for its alias? Link to comment Share on other sites More sharing options...
foamyesque Posted May 12, 2017 Share Posted May 12, 2017 (edited) There's a few ways to do it. That's one of them; it's also possible to do script-driven pathing and holding. Quest-based solutions suffer if you start wanting multiple possible path-to targets or to apply the spell to multiple targets; it's still possible but it starts turning into a rats nest of editor objects. Edited May 12, 2017 by foamyesque Link to comment Share on other sites More sharing options...
skinnytecboy Posted May 12, 2017 Share Posted May 12, 2017 It's very possible, and there's probably a multitude of ways you could achieve it. Me, I'd use a spell that places an xmarker and forces the ref target and the xmarker to an empty aliases... and then the spell would fire a scene. In that scene i would run a package that makes the alias travel to that xmarker. Of course, I've never tried this myself. :) Link to comment Share on other sites More sharing options...
opusGlass Posted May 12, 2017 Author Share Posted May 12, 2017 Quest-based solutions suffer if you start wanting multiple possible path-to targets Would I have to define a path? The spell is intended to be used anywhere in the world, so I won't be able to do that. The only thing that will always stay the same is the destination. I think I recall a return-to-editor-location, maybe if I look inside I can find a way to swap the editor location with an xmarker. Then if I set it to the highest priority, it should override whatever other behaviors the NPC wants to do, right? I don't want it to apply to multiple targets, so I don't have to worry about that. then the spell would fire a scene. I'm completely unfamiliar with scenes, what benefit would this provide over just directly placing the package on a quest alias? Link to comment Share on other sites More sharing options...
Elias555 Posted May 13, 2017 Share Posted May 13, 2017 Scriptname AceQuanChiTrance extends activemagiceffect Bool Switch Actor kTarget Keyword Property ActorTypeNPC Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if akTarget.IsHostileToActor(akCaster) && akTarget.HasKeyword(ActorTypeNPC);you don't need this Utility.Wait(0.2) Switch = true akTarget.SetRestrained(true) While Switch == True akTarget.PathToReference(akCaster,1) ;You could change this to a marker or placed activator EndWhile EndIf EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) Switch = False akTarget.SetRestrained(false);Change to true to get them to stay in place when the effect ends, not necessarily when they reach the destination EndEvent Check the trance spell out if you want to see how it looks http://www.nexusmods.com/skyrim/mods/61913/?http://www.creationkit.com/index.php?title=PathToReference_-_ActorYou would need a check to see if the actor is near the marker/activator/actor if you want them to stop when they get there. Link to comment Share on other sites More sharing options...
foamyesque Posted May 13, 2017 Share Posted May 13, 2017 If there's no need to make the spell apply to multiple objects simultaneously (i.e, it will reject an attempt to apply it to a second NPC while the first one is travelling), and if the destination is always the same, the quest-alias-package setup you proposed in the OP will be fine. If you want to extend it to multiple people pathing simultaneously, you could add additional aliases easily as long as the target remained the same. Once you start wanting independent targets, I don't know of a clean solution. :( Link to comment Share on other sites More sharing options...
opusGlass Posted May 17, 2017 Author Share Posted May 17, 2017 The quest alias with package worked like a charm! Plus it has options to make sure they don't talk to anyone, ignore combat, etc. Thank you everyone :) Link to comment Share on other sites More sharing options...
Recommended Posts