QaxeIsKaze Posted September 3, 2012 Share Posted September 3, 2012 Hope this is the right place to pose a question about a mod I am working on. I am hoping to emulate the teleport-out effect used by such NPC as the Hag at Hag's End, for use with an enemy NPC in my own mod. It is probably identical to the blue, spherical teleport effect used when we conjure dremora, etc. etc. I have looked at Hag's End dungeon and the Hag npc itself in Creation Kit, hoping to gain some insight on how it is set up, but it seems that the effect is set into the Hag NPC's battle script which is something I don't (yet?) understand how to reproduce. To clarify, I am not looking to teleport my own character, I want my enemy/boss npc to teleport away at some point. If you know of a tutorial that deals with this, please point me toward it? Or if you have the knowledge, please share. Link to comment Share on other sites More sharing options...
Sjogga Posted September 3, 2012 Share Posted September 3, 2012 You might want to look at the defaultTeleportAbility.psc file. It covers the teleport ability used by The Caller during the mage guild questline. Link to comment Share on other sites More sharing options...
QaxeIsKaze Posted November 1, 2012 Author Share Posted November 1, 2012 It's been a while since I've approached this topic -- I've been busy with another mod -- but I would like to re-approach the topic. Thinking I might "reverse engineer" myself into understanding at a level where I could replicate an existing effect in the game, I've looked at the MG03 quest, the Caller actor file, at the MG03CallerDefaultPackage, and at MGteleportIn & Out effects, but I'm still no closer to replicating the teleporting npc effect. What I'm hoping to do is allow an enemy npc to jump to another location when attacked, making that npc harder to battle. I understand that I'll need xmarkers to send the npc "somewhere" but I'm really unclear on how to set it all up. Presumably I'll need to do some quest building, but I am guessing that I'll not actually find the answer by looking into existing quests under Quest Aliases or the like. Any ideas on where to look for the answer? I'd prefer to stick with Creation Kit and not get involved with other resources. Link to comment Share on other sites More sharing options...
KingsGambit Posted November 1, 2012 Share Posted November 1, 2012 Is this fight a one-off? Will it always take place in a specific location? Lastly, are his/her teleports "short-range", (ie. within the same area/LoS)? There are 3 main aspects that I can see to realising this idea. In no particular order, you have to create points to where the NPC can teleport, evaluate the conditions to decide if they should teleport, and the teleport mechanic itself. For the first, if it's a specific area, you can drop some invisible markers around the cell in the CK. If you configure them all as auto properties in your script, you can then read them into an array and use randomint to randomise which one is used. Another method would be to create on the fly, a marker at a random location relative to a reference (eg. the player, the NPC themselves, etc). For example: ObjectReference MyMarker = Game.GetPlayer().PlaceAtMe(YourMarkerBase) ;Creates a new object of type yourmarkerbase where the player is or YourNPC.MoveTo(YourNPC, Utility.RandomFloat(1.0, 30.0), Utility.RandomFloat(1.0, 30.0), Utility.RandomFloat(1.0, 30.0)) ; Moves the actor/object to a random point within 1-30 units along X, Y and Z coords, relative to itself. For the second, will it be on a timer, whenever they're hit, whenever they're hit by a specific attack/person, etc? There is an objectreference event OnHit() that might be useful. For the actual moving, you will pretty much need to use MoveTo(). Eventually you will want to look into maybe having special FX as well, for example an explosion at the source and destination locations. That is relatively straightforward, using PlaceAtMe(). I realise this isn't very specific but these are ideas to get you started in a good direction. Link to comment Share on other sites More sharing options...
morismark Posted January 3, 2021 Share Posted January 3, 2021 It's past so many years. I found this script pyrotx Sky Ai Teleporting NPCs at Skyrim Nexus - Mods and CommunityBut I don't know how write a script.It works well, but it cause CTD. So I would to write another one. Someone help me? Link to comment Share on other sites More sharing options...
Closedhands Posted January 4, 2021 Share Posted January 4, 2021 Take a look at Darkfox on Yootube he does a lot of scripting tuts and they are fairly easy to follow. I especially like his simple scripts. here's one I got going from one of his tuts. It will teleport me to a specific location I have set up in the game, at the time I think it was some player unground lair***********************************************************************************************************************************Note: Take a look at Darkfox's Tut on how you should plug this in. Scriptname DovakiinTeleportScript extends activemagiceffect{This script will teleport a Player to a specific Location}ObjectReference Property Loc Auto Event OnEffectStart(Actor akTarget, Actor akCaster)Utility.Wait(1.5)Game.FadeOutGame(False, True, 2.0, 1.0)Game.GetPlayer().Moveto(Loc)Game.EnableFastTravel()Game.FastTravel(Loc)EndEvent Just slap in a special effect attach the effect to a spell(New) then link to a book so you can learn the spell and Bob your Uncle. Well hopefully. But check out darkfox channel he's got plenty of good ideas. Link to comment Share on other sites More sharing options...
GoblinSlayeru15 Posted January 7, 2021 Share Posted January 7, 2021 Try apocalypse magic mod, it adds some teleport spells, but in order to NPC uses them, you need to make minor changing in magic effects of the spells: You need to add attaking or paralyse effects to "trick" AI to uses teleport like attack spell. Link to comment Share on other sites More sharing options...
Recommended Posts