wip: craftable and moveable alchemy+ crafting + food satchel

Post » Mon Jun 18, 2012 11:05 pm

I have made an satchel who I can place everywhere I want, I can store all alchemy ingredients in inventory with a push of an button, plan to expand this to crafting material and raw food.

Everything works fine, except getting its position right.

To place the container I an misc placeholder item with the satchel mesh, I drop this from inventory, place it where I want and activate it this creating an new satchel mesh.
the new mesh is created around one meter up and random around me.
newsatchel.moveto(placeholder) does not work and is giving random result.
x,y,z coordinates on self in the placeholder's script is usually 0,0,0 but might also be other values.

Anybody have any idea here? Extremely annoying to be so close.

Event OnActivate(ObjectReference akActionRef)If akActionRef == Game.GetPlayer()  Int ButtonPressed = mmalchemysachel_place.Show()  If ButtonPressed ==0   ObjectReference newsachel = self.PlaceAtMe(mmalchemysachel_container,1,true,false)     newsachel.moveto(self,0,0,0,true)   newsachel.Enable()   newsachel.BlockActivation()   self.Delete()  endif  If ButtonPressed ==2   self.Activate(AkActionRef,true)  endifelse  self.Activate(AkActionRef,true)endifEndEvent

I wonder if self is referring to myself and not the placeholder, if I use Game.GetPlayer().PlaceAtMe(mmalchemysachel_container,1,true,false) and then moveto it ends up under my feet, position of the placeholder is not important.
Any way of getting an reference to the object the script is running on?
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Mon Jun 18, 2012 2:16 pm

Nobody having any experience with moveto on furniture?
or simply getting the coordinates from dropped items, it look that drop point is the zero coordinates.
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am


Return to V - Skyrim