MoonlightArcher Posted June 25, 2013 Share Posted June 25, 2013 How can I teleport a NPC to a specific location(or XMarker) when a quest stage has been done?What script do I need to use? Or what Package?I tried to make a scene for it but it didn't work and also the scriptline alias_NPC.ForceToRef(XMarker) did not work. Also the line game.GetPlayer().PlaceAtMe(XMarker) did not work.I really need help with this. Link to comment Share on other sites More sharing options...
Korodic Posted June 25, 2013 Share Posted June 25, 2013 forcetoref is changing what reference the alias is using. You want to use the moveto() function.http://www.creationkit.com/MoveTo_-_ObjectReference Link to comment Share on other sites More sharing options...
MoonlightArcher Posted June 26, 2013 Author Share Posted June 26, 2013 I tried that option but it says that it isn't a function. And when I tried again it said that there was no input generated. Link to comment Share on other sites More sharing options...
bwins95 Posted June 26, 2013 Share Posted June 26, 2013 This is a script from one of my mods it's attached to a spell, but you should be able to change it to work for you.This is untested, but I think it's at least close to what you want.Scriptname FR_AelaTheHuntress extends activemagiceffect ObjectReference property AelaTheHuntressREF autoQuest property questnamebelow AutoEvent OnEffectFinish(Actor target, Actor caster) if (SideQuestProperty.GetStageDone(10)) AelaTheHuntressREF.MoveTo(Game.GetPlayer(), 120 * Math.Sin(Game.GetPlayer().GetAngleZ()), 120 * Math.Cos(Game.GetPlayer().GetAngleZ()), Game.GetPlayer().GetHeight() + 2) endifEndEventChange AelaTheHuntressREF to who ever you want to teleport.Change game.getplayer to the marker reference.Change SideQuestProperty to your quest.Don't forget to set them in the script property or it won't work. The math part the moveto line will set the teleported npc slightly infront of and a bit above the marker, so you'll want to play around with hte number.Placeatme just create clones instead of moving who you want. Link to comment Share on other sites More sharing options...
MoonlightArcher Posted July 5, 2013 Author Share Posted July 5, 2013 Thanks, but none of it worked :( I just used a simple disableat stage function and enable it as a "spawn at XMarker". Link to comment Share on other sites More sharing options...
Recommended Posts