I have a weird problem with Player.DropObject: sometimes the items I drop don't appear in the world, to be more precise:
- The items are removed from the player's inventory,
- a Debug.Messagebox scripted after the Drop command appears correctly,
- in most cases in the same moment the objects appears behind the messagebox
- and drops to the ground after the messagebox has been closed.
- Sometimes (approximately one in 5),
- unrelated to the item (items disappearing in one test appear in the next)
- the item fails to appear behind the messagebox (not there or invisible and not activable)
- but only in interior cells, not in Tamrial or hold worldspaces!
Thanks in advance!
Edit:
I tried checking for the object
DroppedObject = Player.DropObject(ThisItem, nDropNow) Count = -1 if ( DroppedObject ) Count = 0 While ( !DroppedObject.Is3DLoaded() && (Count < 10) ) Count = Count + 1 EndWhile endifas I've seen http://www.creationkit.com/Dissecting_the_Scripts_for_Weapon_Racks, but DroppedObject is valid and Count=1, even when the object disappears.
Another edit:
Moving the object seems to heal the issue
DroppedObject.MoveTo(Player, \ 120 * Math.Sin(Player.GetAngleZ()), \ 120 * Math.Cos(Player.GetAngleZ()), \ 0.7 * Player.GetHeight())
