player.moveto

Post » Thu Aug 25, 2011 8:11 am

So I have been working on a mod and seem to have a problem with teleporting. I have been doing some research and discovered this may be a bug in the engine.
I have an NPC that when killed teleports the player to a designated marker. It all works fine except I seem to be stuck in some sort of loop. I keep being sent back to said marker after I am ported there.
After all the reading I have I done I still can't seem to locate a correct code that fixes this. Does anyone have any ideas?
- Thanks
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Thu Aug 25, 2011 7:44 am

Post your script, it's easier to detect issues, but it sounds like you just need a doonce variable to stop it from looping. :foodndrink:
User avatar
Leanne Molloy
 
Posts: 3342
Joined: Sat Sep 02, 2006 1:09 am

Post » Thu Aug 25, 2011 10:37 am

Post your script, it's easier to detect issues, but it sounds like you just need a doonce variable to stop it from looping. :foodndrink:


ScriptName DeathMovePlayerScript

begin OnDeath
player.moveto RealmMarker01
endif

End


I did at one point add the "doonce". When I did that I got stuck looking at the loading screen. Had to reboot my computer to leave it. I may have placed that part in the wrong line. Not sure.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Thu Aug 25, 2011 9:16 am

Try this

ScriptName DeathMovePlayerScriptshort dooncebegin OnDeath     If doonce == 0          set doonce to 1          player.moveto RealmMarker01     endifEnd

User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Thu Aug 25, 2011 8:14 am

Try this

ScriptName DeathMovePlayerScriptshort dooncebegin OnDeath     If doonce == 0          set doonce to 1          player.moveto RealmMarker01     endifEnd




I just gave this a try, and I'm back at being stuck at the loading screen while porting. I don't get what's going here.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Thu Aug 25, 2011 5:17 pm

Try this

ScriptName DeathMovePlayerScriptshort dooncebegin OnDeath     If doonce == 0          set doonce to 1          player.moveto RealmMarker01     endifEnd


User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Thu Aug 25, 2011 3:25 pm

I just went back and checked a couple of things. Didin't really do much but reload the mod and ran it again. Now it works. Go figure. I'm looking at this version you posted and it has a line I didn't have. I used this one, and yeah, that was it. Thanks for the help. I'll add your name to the list of help I recieved. I'll post it on TESNexus in a few days under this name if you wanna check it out. Thanks again.

PS. Sorry for the "edit". I screwd up your posting by mistake.
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Thu Aug 25, 2011 1:59 pm

Glad it's working. When working with scripts it's super important to test with a clean save, which is a save game from before your mod was ever loaded, as game saves can save data and make working scripts appear to still be malfunctioning. Good luck with your release :foodndrink:
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm


Return to IV - Oblivion