... and the final bit about what this whole thread was for is now in place, working perfectly!
Edsploration - I didn't end up using most of what you came up with, but the socket objects themselves (the x and y, not the moving ones) and the overall concept were absolutely invaluable. I adjusted how it works and tied it in to my mouseSave and mouseRestore functions. For the sockets, I simply have them run mouseSave and activate a timer which 0.01s runs mouseRestore. Those mouse functions delete the object before it even leaves your hands, and restores it, so there is no thrown/dropped noise. I also increased the target size middle number, and placed the sockets so that you can still place items right down on the square you occupy but not in the square ahead.
Code: Select all
defineObject{
name = "no_throw_alcove_x",
class = "Alcove",
anchorPos = vec(0, 2, 1.5), -- the parts are all close to 0.5 in, so this should be "behind" them
targetPos = vec(0, 2, 1.5),
targetSize = vec(0, 3, 5),
placement = "wall",
onInsertItem = function(self, item)
noThrowScript.noThrow()
return false
end,
editorIcon = 92,
}
defineObject{
name = "no_throw_alcove_y",
class = "Alcove",
anchorPos = vec(0, 2, 1.5), -- the parts are all close to 0.5 in, so this should be "behind" them
targetPos = vec(0, 2, 1.5),
targetSize = vec(5, 3, 0),
placement = "wall",
onInsertItem = function(self, item)
noThrowScript.noThrow()
return false
end,
editorIcon = 92,
}
and in the script it's just:
Code: Select all
function noThrow()
mouseItemScript.mouseSave()
noThrowTimer:activate()
end
function throwRestore()
mouseItemScript.mouseRestore()
end
with the noThrowTimer set to 0.01s and connected to trigger throwRestore() (and deactivate itself)
I know I could have put those things in the object definition, but I really like to keep my hook links to the absolute minimum, and then handle everything inside the editor.
I absolutely could not have done this without you guys, thanks a ton!

THANK YOU Edsploration for the script and concept, and
THANK YOU Xanathar for the item properties saving script