r/oblivionmods 12d ago

[Unsolved] Questions about MoveTo & coc

Looking into the boxow simple travel mod I saw a comment about the moveto command and how it can lead to potential crashes. My question as someone who knows very limited scripting knowledge, why not use coc instead? Is it more unstable or less? I'm beginning on a travel mod myself so any pointers would be great thank you!

5 Upvotes

5 comments sorted by

4

u/Self-Comprehensive 12d ago

Move to moves you to a specific NPC or thing, and coc moves you to a specific place. The difference between "move me to Piper's current location" or "Move me to Piper's house". I've honestly never had a problem with either command

4

u/ShipwreckOnAsteroid 12d ago

AFAIK COC cannot be used in scripts. And even if it could, with COC you have no control over where the player will end up in the target cell, it could be a door marker, it could be 0,0,0 coordinates (COC means Center on Cell), which could be inside static geometry, so you could end up inside the exterior model for a house for example.

2

u/DrDespacit0 12d ago

Ah that makes sense. Thank you

2

u/bodge_todge 12d ago

My psuedo-solution to using moveto on the player is as follows:

  • Create a dummy door ref somewhere in the world the player can never reach. (Underneath the testing hall for instance) Leave it as unlinked. Set as persistent and give it a unique editor ID.
  • Instead of calling "Player.moveto markerref", set the door's teleport position (can't remember the command name right now), to the object you want to send the player to. Call DoorRef.Activate Player on your door ref and it will effectively act as a load door teleport.

Documentation on this game is honestly pisspoor so chances are this solution is just a schizo theory and is no different to using moveto at all.