PHGDAL Posted August 8, 2012 Share Posted August 8, 2012 Okay, I wanted to make a follower teleportation spell because my followers seem to lag behind when I roam around and I always have to go "prid 000xxxxx / moveto player". I wanted a spell that does exactly that but without me having to use the console. I managed to get the teleportation part working beautifully thanks to some youtube videos but I can't seem to get the script to "auto-detect" who your follower is and then teleport them. I tried dissecting Bethesda's follower scripts to no avail. Also, I wanted to create another spell which has the basic effect of the "Unrelenting Force" shout but in all directions of the player (so I wouldn't even aim, I would just charge it as a two handed spell and once I let go, people right next to be would be pushed away. I couldn't get this "Area Effect" on the spell, much less make it harmless to me, can you explain how to do this if you can as well? I would be most grateful. I have more questions but I'll just post the spell scripting ones in this thread to make it neater =} Link to comment Share on other sites More sharing options...
gasti89 Posted August 8, 2012 Share Posted August 8, 2012 For the 1st question, i'm thinking about using the follower aloias from the follower quest. That alias should be filled with your current follower. So in your script you can call a ReferenceAlias property and then use it as the reference for the PlaceAtMe. Link to comment Share on other sites More sharing options...
PHGDAL Posted August 9, 2012 Author Share Posted August 9, 2012 For the 1st question, i'm thinking about using the follower aloias from the follower quest. That alias should be filled with your current follower. So in your script you can call a ReferenceAlias property and then use it as the reference for the PlaceAtMe. Thank you! The ReferenceAlias was just what I needed. I managed to make a spell that teleports the current follower to me at any time. However, I was wondering if you could help even more? The only way I managed to get the teleportation working was by targeting at an actor (whenever I changed the script to a location or something it would give me an error when compiling), so I changed the spell to deliver to "self" so that the actor targeted was me. I was wondering how to use the actual target on screen to 1. allow me to teleport my follower regardless of what it was pointing at, and 2. Teleport the follower where I am pointing. I would copy bits and pieces from a summon spell, but they don't have any scripts on them. Link to comment Share on other sites More sharing options...
gasti89 Posted August 9, 2012 Share Posted August 9, 2012 Uhm, this could be doable by creating another spell (or script your current spell with a messagebox, so that you have options). The new spell/part of the old spell would create a "portal" (it can also be an invisible marker) to where you point your crosshair. The the second cast or another spell would teleport the NPC in the portal location. There was an aimed teleport spell on the nexus, but i can't remember the name. I don't know how to get references from script-created objects, so i can't help you more, but if you find that mod its script should be what you want. Link to comment Share on other sites More sharing options...
Sjogga Posted August 9, 2012 Share Posted August 9, 2012 I was wondering how to use the actual target on screen to 1. allow me to teleport my follower regardless of what it was pointing at 2. Teleport the follower where I am pointing. I would copy bits and pieces from a summon spell, but they don't have any scripts on them. 1: cant say if it works or not, but it should. Make ajustments if needed. ReferenceAlias Property CurrentFollower Auto VisualEffect Property Fx Auto ; Fill with some nice summoning effect, such as DA09Valor (Call of valor), or MGTimeTeleportIn (psjiic mage effect) Event OnEffectStart(actor target, actor caster) CurrentFollower.GetActorRef().moveto(caster, -120 * Math.Sin(caster.GetAngleZ()), 0, 0) ; the math bit makes sure followers are not placed on top of the player int i = 0 while(!CurrentFollower.GetActorRef().is3dLoaded || i<10) utility.wait(0.1) i+=1 endwhile Fx.play(CurrentFollower, 2.0) endEvent 2: Is abit more tricky as you need to track where you hit. This can be done by using custom Projectiles attached with custom Explosions that spawns a custom Activator. The script pretty much looks the same, exept the event is "OnInit()" and "Caster" is "Game.GetPlayer()".Also add this at the end: utility.wait(1.0) self.delete() Have fun! (I really should add follower support to my teleport spells) Link to comment Share on other sites More sharing options...
PHGDAL Posted August 9, 2012 Author Share Posted August 9, 2012 I was wondering how to use the actual target on screen to 1. allow me to teleport my follower regardless of what it was pointing at 2. Teleport the follower where I am pointing. I would copy bits and pieces from a summon spell, but they don't have any scripts on them. 1: cant say if it works or not, but it should. Make ajustments if needed. ReferenceAlias Property CurrentFollower Auto VisualEffect Property Fx Auto ; Fill with some nice summoning effect, such as DA09Valor (Call of valor), or MGTimeTeleportIn (psjiic mage effect) Event OnEffectStart(actor target, actor caster) CurrentFollower.GetActorRef().moveto(caster, -120 * Math.Sin(caster.GetAngleZ()), 0, 0) ; the math bit makes sure followers are not placed on top of the player int i = 0 while(!CurrentFollower.GetActorRef().is3dLoaded || i<10) utility.wait(0.1) i+=1 endwhile Fx.play(CurrentFollower, 2.0) endEvent Ah, I was wondering what that math bit was for in some other scripts... The only problem I have with the MGTimeTeleportIn is that the character doesn't fully teleport. Parts of it are missing and the rest transparent, it is fixed when I go through a load door, but until then it is very buggy, I couldn't solve that for some reason. 2: Is abit more tricky as you need to track where you hit. This can be done by using custom Projectiles attached with custom Explosions that spawns a custom Activator. The script pretty much looks the same, exept the event is "OnInit()" and "Caster" is "Game.GetPlayer()".Also add this at the end: utility.wait(1.0) self.delete() For this part, how would I make the destination be the activator if it doesn't really exist until the projectile creates it? It then can't be a property can it? Link to comment Share on other sites More sharing options...
Sjogga Posted August 10, 2012 Share Posted August 10, 2012 2: Is abit more tricky as you need to track where you hit. This can be done by using custom Projectiles attached with custom Explosions that spawns a custom Activator. The script pretty much looks the same, exept the event is "OnInit()" and "Caster" is "Game.GetPlayer()".Also add this at the end: utility.wait(1.0) self.delete() For this part, how would I make the destination be the activator if it doesn't really exist until the projectile creates it? It then can't be a property can it? The script itself is attached to the activator, thus extending ObjectReference instead of MagicEffect. The OnInit()-event is fired when the activator spawns. Link to comment Share on other sites More sharing options...
Recommended Posts