SetPos and getPos work. (i've note tested crossing cell border yet).
Position should work.
But i've a question with PositionCell: should i create a new function moveObjectToCell(ptr,newcell,position) in MWBase::World?
Edit: from uesp wiki for Position and PositonCell: "If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location". It's rather complicated because it should find the same "safe location" than morrowind if we don't want to break compatibility right? And as i don't have my CD of morrowind right now, i can't really tell which way the "safe location" is found, so i won't be able to do it right away.
Object Movement/Creation
Object Movement/Creation
Last edited by gus on 05 Aug 2012, 17:59, edited 1 time in total.
Re: Object Movement/Creation
Added moveObject(Ptr &, CellStore &, f, f, f), pushed to local branch movement_code_refactoring. Still w/o safe location search.
Re: Object Movement/Creation
We have a separate issue for this problem, because it is not specific to scripting instructions. The same feature will be used when NPCs move between cells by other means than scripts.Edit: from uesp wiki for Position and PositonCell: "If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location". It's rather complicated because it should find the same "safe location" than morrowind if we don't want to break compatibility right? And as i don't have my CD of morrowind right now, i can't really tell which way the "safe location" is found, so i won't be able to do it right away.
Its okay if you want to go ahead and implement safe NPC end positions anyway, but it is not needed right now IMHO. Also the changes to NPC physics that are currently worked on might interfere with the implementation.