Some help creating an instant teleport or "blink" sp

Post » Fri Nov 16, 2012 8:09 am

Hey guys, I noticed while looking at all the magical effects and scripts there is some teleport abilities. However, these scripts and abilites are oriented to npc's only rather then the player. Does anyone have some ideas they can throw me on how i could make an instant teleport spell? For example.. You cast the spell and it moves you in the direction ~ 150 feet or so? Ive seen that some other people have made "ConjureSelf" spells and stuff like that, but i dont really know how to do that. Any and all help will be greatly appreciated :smile:
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Fri Nov 16, 2012 6:47 pm

Bump, anyone?
User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am

Post » Fri Nov 16, 2012 6:27 pm

Use http://www.creationkit.com/MoveTo_-_ObjectReference with RandomNoob's trig.

PlayerREF.MoveTo(PlayerREF), 2048 * Math.Sin(PlayerREF).GetAngleZ()), 2048 * Math.Cos(PlayerREF.GetAngleZ())) ; Move player 96' in front of their current position
User avatar
Madison Poo
 
Posts: 3414
Joined: Wed Oct 24, 2007 9:09 pm

Post » Fri Nov 16, 2012 9:05 pm

Use http://www.creationkit.com/MoveTo_-_ObjectReference with RandomNoob's trig.
PlayerREF.MoveTo(PlayerREF), 2048 * Math.Sin(PlayerREF).GetAngleZ()), 2048 * Math.Cos(PlayerREF.GetAngleZ())) ; Move player 96' in front of their current position

Thank you very much, this little piece of code will work nicely :D
User avatar
Silvia Gil
 
Posts: 3433
Joined: Mon Nov 20, 2006 9:31 pm

Post » Fri Nov 16, 2012 10:24 am

Only problem with this is that it will teleport you through walls (which may be the desired behavior), into inaccessible regions, off cliffs, and under the map (which probably isn't).

If you want a "Teleport to the spot under the cursor" spell, examine the Throw Voice spell to learn how to use Target Location delivery with an invisible Explosion to spawn an invisible Activator. Give that Activator a script that moves the player to it in the onLoad event, then deletes the Activator.

You can limit it to Navmesh locations (the way Summon/Conjure spells work) by using checking "Snap to NavMesh" in the Spell Effect, or you can leave it unchecked to allow the player to teleport himself to any location he can target.
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Fri Nov 16, 2012 5:18 pm

Only problem with this is that it will teleport you through walls (which may be the desired behavior), into inaccessible regions, off cliffs, and under the map (which probably isn't).

If you want a "Teleport to the spot under the cursor" spell, examine the Throw Voice spell to learn how to use Target Location delivery with an invisible Explosion to spawn an invisible Activator. Give that Activator a script that moves the player to it in the onLoad event, then deletes the Activator.

You can limit it to Navmesh locations (the way Summon/Conjure spells work) by using checking "Snap to NavMesh" in the Spell Effect, or you can leave it unchecked to allow the player to teleport himself to any location he can target.

Thats a good idea :o
User avatar
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am

Post » Fri Nov 16, 2012 9:06 pm

Only problem with this is that it will teleport you through walls (which may be the desired behavior), into inaccessible regions, off cliffs, and under the map (which probably isn't).

If you want a "Teleport to the spot under the cursor" spell, examine the Throw Voice spell to learn how to use Target Location delivery with an invisible Explosion to spawn an invisible Activator. Give that Activator a script that moves the player to it in the onLoad event, then deletes the Activator.

You can limit it to Navmesh locations (the way Summon/Conjure spells work) by using checking "Snap to NavMesh" in the Spell Effect, or you can leave it unchecked to allow the player to teleport himself to any location he can target.

I examined the throw voice spell and to my surprise, there is no script attached to it... I was able to copy the magical effect and all that, but im not sure what my Papyrus script should look like. Any hints you can give me?
User avatar
Rusty Billiot
 
Posts: 3431
Joined: Sat Sep 22, 2007 10:22 pm

Post » Fri Nov 16, 2012 7:36 pm

Yes, it took me a while to figure it out. It's yet another example of the Rube Goldberg-eque nature of the CK.

To spawn an activator at the Target Location without making it a Conjure/Summon spell, you have to do the following:
  • Create the Activator or other object you want to place at the target location.
  • Create an empty Explosion by duplicating one of the explosions that uses FXEmptyObject.nif or FXEmptyExplosionArt.nif, then delete all effects, sounds, etc from it (unless you want effects and sounds, obviously). Set force and damage to 0 and radius to 1. Under Placed Object, select the Activator you created in step 1.
  • Create the Magic Effect you want to use to spawn your object. Set all the special effects, etc. Under Explosion, pick the empty Explosion you created in step 2. Set the Effect Archetype to Spawn Scripted Ref (not sure this is needed, actually, but it's what Throw Voice uses). Set Delivery to Target Location. You can leave ALL checkboxes unchecked, or check Snap To Navmesh to make sure the activator is summoned at ground level.
  • Create the Spell. When adding the Magic Effect you created in step 3, MAKE SURE TO SET THE MAGNITUDE TO 1. If you don't the spell will fail silently. Set the range, etc.
  • Save and test!
This may seem roundabout (and it is) but it's VERY fast and 100% reliable.
User avatar
james tait
 
Posts: 3385
Joined: Fri Jun 22, 2007 6:26 pm

Post » Fri Nov 16, 2012 5:19 pm

Yes, it took me a while to figure it out. It's yet another example of the Rube Goldberg-eque nature of the CK.

To spawn an activator at the Target Location without making it a Conjure/Summon spell, you have to do the following:
  • Create the Activator or other object you want to place at the target location.
  • Create an empty Explosion by duplicating one of the explosions that uses FXEmptyObject.nif or FXEmptyExplosionArt.nif, then delete all effects, sounds, etc from it (unless you want effects and sounds, obviously). Set force and damage to 0 and radius to 1. Under Placed Object, select the Activator you created in step 1.
  • Create the Magic Effect you want to use to spawn your object. Set all the special effects, etc. Under Explosion, pick the empty Explosion you created in step 2. Set the Effect Archetype to Spawn Scripted Ref (not sure this is needed, actually, but it's what Throw Voice uses). Set Delivery to Target Location. You can leave ALL checkboxes unchecked, or check Snap To Navmesh to make sure the activator is summoned at ground level.
  • Create the Spell. When adding the Magic Effect you created in step 3, MAKE SURE TO SET THE MAGNITUDE TO 1. If you don't the spell will fail silently. Set the range, etc.
  • Save and test!
This may seem roundabout (and it is) but it's VERY fast and 100% reliable.
Perfect! Thank you so much for the help :D Works like a charm now!
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Fri Nov 16, 2012 9:52 am

Glad I could help! I'd love to see a video of the finished effect :)
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm

Post » Fri Nov 16, 2012 12:22 pm

Could you post the script for this? I'm interested in seeing it, I might use a feature similar to this in a future mod, but for now I want to study it for learning purposes.
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Fri Nov 16, 2012 10:20 pm

Glad I could help! I'd love to see a video of the finished effect :smile:

Sure thing :smile: .. Im currently on vacation so i wont be able to make a video until i get back home tommorow :smile:

Could you post the script for this? I'm interested in seeing it, I might use a feature similar to this in a future mod, but for now I want to study it for learning purposes.

Sure, i will post the mod in the mods section of the forum tomorrow after i get home from vacation :smile: . I will include some images of how i have it setup in the CK as well as the script i use.

EDIT: Btw, your Rfiten Fight club mod looks awesome, going to try it out tomorrow :biggrin:
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Fri Nov 16, 2012 9:37 pm

Thanks! If everything goes well today I might have the update released tomorrow with voice acting. :biggrin:
User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm


Return to V - Skyrim