Scripting problems with .moveto

Post » Mon Jun 18, 2012 5:57 am

I'm trying to get a basic cast spell teleport to the x marker going. First half works but the .moveto bit is getting me hung up. This is what I have so far:

Scriptname aaSerStudyTeleSpell extends activemagiceffect{Spell to teleport to the Study}Spell Property aaSerStudyTeleportSpell AutoObjectReference Property aaSerStudyEntranceMarker Auto  Event OnEffectStart(Actor akTarget, Actor akCaster)	Debug.Notification("Spell Detected!")	game.GetPlayer().MoveTo(aaSerStudyEntranceMarker)endEvent

The Debug line is triggering fine and I have the xmarker property set up right as far as I can tell. I don't know I was just starting to get a feel for Obliv scripting and Papyrus has throw me for a loop. I've done quite a few searches and looked all over the wiki. If anyone can help I'd be grateful.
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Mon Jun 18, 2012 7:11 am

Try removing the Debug I've been having issues with these causing script halts, or move it to below the MoveTo.
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Mon Jun 18, 2012 5:26 pm

Removed the debug line, no dice =/
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Mon Jun 18, 2012 1:11 pm

SpellProperty aaSerStudyTeleportSpell Auto

What's that supposed to be for? It doesn't look like it's getting used in the script at all.
User avatar
Brιonα Renae
 
Posts: 3430
Joined: Mon Oct 22, 2007 3:10 am

Post » Mon Jun 18, 2012 4:58 pm

SpellProperty aaSerStudyTeleportSpell Auto

What's that supposed to be for? It doesn't look like it's getting used in the script at all.

Left over from my first attempt to check for the spell with OnSpellCast. I couldn't see it causing problems so I just sorta left it there incase I needed it later.. or something. Could it be causing problems?
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Mon Jun 18, 2012 5:23 am

It shouldn't, wast just making sure you weren't accidentally leaving anything out.

I'm gonna go ahead and try making this myself, see if I can figure it out. Gimme a few minutes.
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Mon Jun 18, 2012 8:38 am

Scriptname TeleportMagicScript extends activemagiceffect  ObjectReference Property teleportLocation Auto  Event OnEffectStart(Actor akTarget, Actor akCaster)        akCaster.MoveTo(teleportLocation)endEvent

Seemed to work just fine for me.
User avatar
Angus Poole
 
Posts: 3594
Joined: Fri Aug 03, 2007 9:04 pm

Post » Mon Jun 18, 2012 3:30 am

Scriptname TeleportMagicScript extends activemagiceffect  ObjectReference Property teleportLocation Auto  Event OnEffectStart(Actor akTarget, Actor akCaster)		akCaster.MoveTo(teleportLocation)endEvent

Seemed to work just fine for me.

Hmm, still nothing on my end. I must be screwing something up but I don't know what. I've triple checked the ObjectRefernce Property because that seems the likly problem but it looks fine. And I made some stuff a this afternoon using ObjectRefernces and they worked so I'm pretty sure I got that right. Maybe I should delete the script / markers / spell and remake them all from scratch just to make sure.

Edit: Oh! A thought, what sort of trigger spell did you use? I don't think thats it because the debug was returning before I removed it but who knows.
Edit2: I've been testing the spell pretty close to the target teleport spot, could that matter? I'm guessing not but figure its worth checking.
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm

Post » Mon Jun 18, 2012 2:12 pm

http://i.imgur.com/TEzen.jpg

http://i.imgur.com/wn1i9.jpg

Also, the location you are when casting the spell shouldn't matter.

MoveTo works even if the target is in a different cell.
User avatar
Kit Marsden
 
Posts: 3467
Joined: Thu Jul 19, 2007 2:19 pm

Post » Mon Jun 18, 2012 10:03 am

Still nothing. It has to be the ObjectRefernce Property, but I've checked it time and time again, remade it twice and reread the sticky on it 3 times. I have it right, but what else could it be.. I'm going to look into more debugging I guess, figure out where the kink is here. I feel silly because this is such a simple script. I mean theres not much room to screw this up.

Anyways, thanks for the help, I really appreciate it.
User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Mon Jun 18, 2012 4:17 pm

So when you're at http://i.imgur.com/TEzen.jpgscreen, and it shows the script, you clicked the properties button, right?

What exactly did you set the reference to?

http://i.imgur.com/wijIW.jpgis my properties window, I clicked "Pick reference in render window" and then double clicked on http://i.imgur.com/gtL4W.jpg.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm

Post » Mon Jun 18, 2012 5:40 pm

So when you're at http://i.imgur.com/TEzen.jpgscreen, and it shows the script, you clicked the properties button, right?

What exactly did you set the reference to?

http://i.imgur.com/wijIW.jpgis my properties window, I clicked "Pick reference in render window" and then double clicked on http://i.imgur.com/gtL4W.jpg.

Yeah, only minor thing I gave my xmarker a Refernce Editor ID and thats what I have in the properties window. It looks like you left yours default could that be it? I'm going to try swapping it now.

Edit: No effect >.>
Edit2: Hmm, if I choose Pick Refernce in Render Window the marker is unselectable red, while almost everything else in the area is targetable.
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Mon Jun 18, 2012 8:19 am

What I did was place an XMarkerHeading in the world, and not alter it at all, and then select it with the properties window.
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Mon Jun 18, 2012 7:30 am

Hold on, I just put in the debugs again and there not firing anymore, let me see whats going on.

Edit: Still no dice. When I rewrote the script I put Extends Objectrefernce insteand of Extends Activemagiceffect apparently. After swapping that back I'm getting my debugs firing again but still no teleport.

Scriptname aaSerStudyRecallScript extends activemagiceffect{Recalls the caster to Deneth's Study}ObjectReference Property aaSerStudyRecallMarker AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	 Debug.Notification("--1--Spell Detected--1--")	 akCaster.MoveTo(aaSerStudyRecallMarker)	 Debug.Notification("--2--Spell Detected--2--")endEvent

Edit 2: Well I'm tired and frustrated. If anyone has any ideas drop em off, I'm going to bed though. And thanks for the help Neonox, wish we chould have pinned it down but I really do appreciate the effort.

Edit3: IT WORKED! Don't know why, don't know how. Remade the whole whole thing from scratch again this morning for the third time and it works now.
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am


Return to V - Skyrim