Teleportation again

Post » Mon Jun 18, 2012 2:51 pm

Hi again,
I have a spell, which moves me into a different level. I would like another spell to take me back to where I was, but I can't figure out a way how to leave some sort of a marker behind me when I teleport and then use it as a reference object to travel back. Any ideas or comments are very appriciated.
User avatar
Svenja Hedrich
 
Posts: 3496
Joined: Mon Apr 23, 2007 3:18 pm

Post » Mon Jun 18, 2012 7:20 pm

Hm, I'm not sure about that, but could you tell me how did you make a spell that teleports you to a certain location? I'd like to make one that teleports me to my custom room.
User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Mon Jun 18, 2012 8:01 pm

When you cast the first spell.. teleport a MarkerHeading to you in addition to that trigger you have. Then when you use the spell to go back, teleport to the marker insted.

Edit:
Misread question. Just place a Marker Heading, and set it up as a property and link it to the spell.
User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Mon Jun 18, 2012 10:08 pm

Misread question. Just place a Marker Heading, and set it up as a property and link it to the spell.
Could you please post an example of the code in papyrus? Because I don't know exactly how to do that, although I feel like it would work the way you described. Thanks :smile:

@H4wkeye
I created a new Magic Effect with a script whith an event that moves the player to a reference location, than you edit the properties of the scrip and make the reference your custom room. Unfortuntely thanks to ACTA (i guess) i can't post a link to a youtube video but the name of it is
Creation Kit - Papyrus: Basic Teleport Spell Tutorial and is by Elec08215
User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Mon Jun 18, 2012 2:06 pm

Scriptname ScarTeleportToHomeTriggerScript extends ObjectReferenceEvent OnActivate(ObjectReference akActionRef)ObjectReference Me = Game.GetPlayer();THIS is the line you would need:ExteriorMarker.Moveto(Me)float ZAngle = Me.GetAngleZ() - 180ExteriorMarker.SetAngle(Me.GetAngleX(), Me.GetAngleY(), ZAngle)   Game.GetPlayer().MoveTo(SpawnTo, 0,0,0, true)EndEventObjectReference Property SpawnTo  AutoObjectReference Property ExteriorMarker  Auto


Thats my code for a teleporting Activator script I wrote that is similar to what you are doing. I cant seem to figure out how to do it through spells (Which is why I reverted to activators)
If you manage to get a working copy, Would you please help me out as well by explaining how you got scripts to run when casting them? I cant seem to get mine to work at all.

Basically Im making a sort of Mobile home, and I kinda need it at the moment. For now Im just using activators
User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Mon Jun 18, 2012 6:55 pm

I'm trying to figure out how to change the spawn location when you first play Skyrim so I decided to edit the main quest to have me teleport to another world space. Here's a picture of it with all the code I put in it:

[img]http://i1238.photobucket.com/albums/ff498/KyleSp/SkyrimCKpic01.png[/img]

Error Report:


Starting 1 compile threads for 1 files...
Compiling "QF_MQ101_0003372B"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_MQ101_0003372B.psc(2429,0): mismatched input 'Event' expecting ENDFUNCTION
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_MQ101_0003372B.psc(2441,0): missing EOF at 'EndFunction'
No output generated for QF_MQ101_0003372B, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_MQ101_0003372B
User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Mon Jun 18, 2012 6:51 am

Could you please post an example of the code in papyrus? Because I don't know exactly how to do that, although I feel like it would work the way you described. Thanks :smile:

@H4wkeye
I created a new Magic Effect with a script whith an event that moves the player to a reference location, than you edit the properties of the scrip and make the reference your custom room. Unfortuntely thanks to ACTA (i guess) i can't post a link to a youtube video but the name of it is
Creation Kit - Papyrus: Basic Teleport Spell Tutorial and is by Elec08215

Thanks a lot man!
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm

Post » Mon Jun 18, 2012 9:34 am

I'm trying to figure out how to change the spawn location when you first play Skyrim so I decided to edit the main quest to have me teleport to another world space. Here's a picture of it with all the code I put in it:

[img]http://i1238.photobucket.com/albums/ff498/KyleSp/SkyrimCKpic01.png[/img]

Error Report:


Starting 1 compile threads for 1 files...
Compiling "QF_MQ101_0003372B"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_MQ101_0003372B.psc(2429,0): mismatched input 'Event' expecting ENDFUNCTION
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_MQ101_0003372B.psc(2441,0): missing EOF at 'EndFunction'
No output generated for QF_MQ101_0003372B, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_MQ101_0003372B


You cant just Copy Paste my code and expect it to work for something completely different than what it is intended for...

for you, all you need is

Game.GetPlayer().MoveTo(SomeReference)
User avatar
Nikki Hype
 
Posts: 3429
Joined: Mon Jan 01, 2007 12:38 pm

Post » Mon Jun 18, 2012 8:41 pm

Scriptname teleporttosetlocationandbackagain extends activemagiceffectObjectReference Property setlocation AutoObjectReference Property Leavemarkerbehind Autoevent OnEffectStart ( Actor Target, Actor Caster )Leavemarkerbehind.MoveTo (Caster)Caster.Moveto (setlocation)endevent

teleports you to a set location, and then moves a marker to the spot you were before you teleported. Make a spell effect with this script in it. Then make a new spell that uses this spell effect.
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Mon Jun 18, 2012 7:38 pm

You cant just Copy Paste my code and expect it to work for something completely different than what it is intended for...

for you, all you need is

Game.GetPlayer().MoveTo(SomeReference)

I didn't copy and paste it. You're not helping with anything.

As you can see, indicated in the picture, it's a quest fragment script so I can't just do that.

It just comes out with even more, larger errors, when doing that.

It can't identify that reference.
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Mon Jun 18, 2012 8:31 pm

Heh. Sorry mate. I was pretty wasted on the forums last night and it looked similar. Yeah. You can't use events on any of the fragments. If you need events, you need to use that code you entered into the fragments section and put it into a new script. Then you can attach the script to the quest on the scripts page, and call functions/checks there.
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am


Return to V - Skyrim