placing items in game

Post » Mon Nov 19, 2012 11:32 am

Have an very strange and old problem here. GetPositionX() ,y and z does not return correct value for moveable items.

Trying to make movable furniture, Idea is simple and inspired by the Imperial furniture mod in Oblivion.

You craft or buy an misc item get in inventory, go where you want to place it, drop it, move to position and activate it. This replace the misc item with an static furniture, it can also be an container, char, bed or even crafting station.
This work nice.

The problem is that GetPositionX(), y and z does not give the current position to the objects after they are moved.
It return the position where the object spawned: in front of you and one meter up.
Exiting the cell and returning makes getposition return correct value.

I have been able to find it by first activate it and do an disable+ enable call who return it to its spawn position, then grab it and move it followed by an new activation.

Wonder if anybody has any better solution here, this is very clunky.

No doing disable+ enable on init does not help, neither do setting it's position in front of the player.
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Tue Nov 20, 2012 2:20 am

This mod does what you are looking to do:
http://skyrim.nexusmods.com/mods/25068

Its open source, so you can check out the code after extracting the .bsa
User avatar
Cheville Thompson
 
Posts: 3404
Joined: Sun Mar 25, 2007 2:33 pm

Post » Mon Nov 19, 2012 1:52 pm

This mod does what you are looking to do:
http://skyrim.nexusmods.com/mods/25068

Its open source, so you can check out the code after extracting the .bsa
has not tested yet but unpacked and just some fragments had source.

Will test and perhaps download some older versions or contact the creator.
User avatar
Stacey Mason
 
Posts: 3350
Joined: Wed Nov 08, 2006 6:18 am


Return to V - Skyrim